#2420
EasyRow
Se consideră următorul șir de numere naturale: 1 3 5 8 10 14 16...
, în care termenul de pe poziția i
(i > 1
) este egal cu cel precedent plus numărul de divizori ai lui i
. Afișați al n
-lea termen.
Imaginatie personala
Problema | EasyRow | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0.1 MB
|
Id soluție | #9762316 | Utilizator | |
Fișier | easyrow.cpp | Dimensiune | 396 B |
Data încărcării | 29 Mai 2018, 22:17 | Scor / rezultat | Eroare de compilare |
easyrow.cpp:1:10: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix] #include <iostream>using namespace std; ^ easyrow.cpp:1:20: warning: extra tokens at end of #include directive [enabled by default] #include <iostream>using namespace std; ^ easyrow.cpp:3:1: error: stray '\302' in program { int n, p=0; ^ easyrow.cpp:3:1: error: stray '\240' in program easyrow.cpp:3:1: error: stray '\302' in program easyrow.cpp:3:1: error: stray '\240' in program easyrow.cpp:3:1: error: stray '\302' in program easyrow.cpp:3:1: error: stray '\240' in program easyrow.cpp:3:1: error: stray '\302' in program easyrow.cpp:3:1: error: stray '\240' in program easyrow.cpp:5:1: error: stray '\302' in program for(int i=1;i<=n;i++) ^ easyrow.cpp:5:1: error: stray '\240' in program easyrow.cpp:5:1: error: stray '\302' in program easyrow.cpp:5:1: error: stray '\240' in program easyrow.cpp:5:1: error: stray '\302' in program easyrow.cpp:5:1: error: stray '\240' in program easyrow.cpp:5:1: error: stray '\302' in program easyrow.cpp:5:1: error: stray '\240' in program easyrow.cpp:6:5: error: stray '\302' in program { int no_div=0, ^ easyrow.cpp:6:5: error: stray '\240' in program easyrow.cpp:6:5: error: stray '\302' in program easyrow.cpp:6:5: error: stray '\240' in program easyrow.cpp:6:5: error: stray '\302' in program easyrow.cpp:6:5: error: stray '\240' in program easyrow.cpp:6:5: error: stray '\302' in program easyrow.cpp:6:5: error: stray '\240' in program easyrow.cpp:7:6: error: stray '\302' in program j=1; ^ easyrow.cpp:7:6: error: stray '\240' in program easyrow.cpp:7:6: error: stray '\302' in program easyrow.cpp:7:6: error: stray '\240' in program easyrow.cpp:7:6: error: stray '\302' in program easyrow.cpp:7:6: error: stray '\240' in program easyrow.cpp:7:6: error: stray '\302' in program easyrow.cpp:7:6: error: stray '\240' in program easyrow.cpp:8:6: error: stray '\302' in program for(j=1;j*j<i;j++) ^ easyrow.cpp:8:6: error: stray '\240' in program easyrow.cpp:8:6: error: stray '\302' in program easyrow.cpp:8:6: error: stray '\240' in program easyrow.cpp:8:6: error: stray '\302' in program easyrow.cpp:8:6: error: stray '\240' in program easyrow.cpp:8:6: error: stray '\302' in program easyrow.cpp:8:6: error: stray '\240' in program easyrow.cpp:8:6: error: stray '\302' in program easyrow.cpp:8:6: error: stray '\240' in program easyrow.cpp:8:6: error: stray '\302' in program easyrow.cpp:8:6: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program if(i%j==0) no_div+=2; if(j*j==i) ++no_div; p+=no_div; } cout << p; ^ easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp:9:10: error: stray '\302' in program easyrow.cpp:9:10: error: stray '\240' in program easyrow.cpp: In function 'int main()': easyrow.cpp:4:2: error: 'cin' was not declared in this scope cin >> n; ^ easyrow.cpp:4:2: note: suggested alternative: In file included from easyrow.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ easyrow.cpp:9:138: error: 'cout' was not declared in this scope if(i%j==0) no_div+=2; if(j*j==i) ++no_div; p+=no_div; } cout << p; ^ easyrow.cpp:9:138: note: suggested alternative: In file included from easyrow.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema EasyRow 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ă.