#1965
Sir8
Să se afle al n
-lea termen al şirului 1, 11, 21, 1211, 111221, 312211, 31112221,...
Problema | Sir8 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51487573 | Utilizator | |
Fișier | sir8.cpp | Dimensiune | 248 B |
Data încărcării | 26 Iunie 2024, 14:37 | Scor / rezultat | Eroare de compilare |
sir8.cpp:1:1: error: 'include' does not name a type include <iostream> ^ sir8.cpp: In function 'int main()': sir8.cpp:5:10: error: 'cin' was not declared in this scope int n;cin>>n;if(n==1)cout<<1;else if(n==2)cout<<1;else if(n==3)cout<<21;else if(n==4)cout<<1211;else if(n==5)cout<<111221;else if(n==6)cout<<312211;else cout<<13112221; ^ sir8.cpp:5:25: error: 'cout' was not declared in this scope int n;cin>>n;if(n==1)cout<<1;else if(n==2)cout<<1;else if(n==3)cout<<21;else if(n==4)cout<<1211;else if(n==5)cout<<111221;else if(n==6)cout<<312211;else cout<<13112221; ^ sir8.cpp:5:46: error: 'cout' was not declared in this scope int n;cin>>n;if(n==1)cout<<1;else if(n==2)cout<<1;else if(n==3)cout<<21;else if(n==4)cout<<1211;else if(n==5)cout<<111221;else if(n==6)cout<<312211;else cout<<13112221; ^ sir8.cpp:5:67: error: 'cout' was not declared in this scope int n;cin>>n;if(n==1)cout<<1;else if(n==2)cout<<1;else if(n==3)cout<<21;else if(n==4)cout<<1211;else if(n==5)cout<<111221;else if(n==6)cout<<312211;else cout<<13112221; ^ sir8.cpp:5:89: error: 'cout' was not declared in this scope int n;cin>>n;if(n==1)cout<<1;else if(n==2)cout<<1;else if(n==3)cout<<21;else if(n==4)cout<<1211;else if(n==5)cout<<111221;else if(n==6)cout<<312211;else cout<<13112221; ^ sir8.cpp:5:113: error: 'cout' was not declared in this scope int n;cin>>n;if(n==1)cout<<1;else if(n==2)cout<<1;else if(n==3)cout<<21;else if(n==4)cout<<1211;else if(n==5)cout<<111221;else if(n==6)cout<<312211;else cout<<13112221; ^ sir8.cpp:5:139: error: 'cout' was not declared in this scope int n;cin>>n;if(n==1)cout<<1;else if(n==2)cout<<1;else if(n==3)cout<<21;else if(n==4)cout<<1211;else if(n==5)cout<<111221;else if(n==6)cout<<312211;else cout<<13112221; ^ sir8.cpp:5:157: error: 'cout' was not declared in this scope int n;cin>>n;if(n==1)cout<<1;else if(n==2)cout<<1;else if(n==3)cout<<21;else if(n==4)cout<<1211;else if(n==5)cout<<111221;else if(n==6)cout<<312211;else cout<<13112221; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Sir8 face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.