#268
DivK
Se dau n
numere naturale şi un număr natural k
. Afişaţi acele numere date care au cel puţin k
divizori.
Variante Bacalaureat 2009
Problema | DivK | Operații I/O |
divk.in /divk.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54843492 | Utilizator | |
Fișier | divk.cpp | Dimensiune | 750 B |
Data încărcării | 10 Decembrie 2024, 10:00 | Scor / rezultat | Eroare de compilare |
divk.cpp:7:18: warning: missing terminating " character [enabled by default] ifstream cin("divk.in); ^ divk.cpp:7:5: error: missing terminating " character ifstream cin("divk.in); ^ divk.cpp:8:19: warning: missing terminating " character [enabled by default] ofstream cout("divk.out); ^ divk.cpp:8:5: error: missing terminating " character ofstream cout("divk.out); ^ divk.cpp: In function 'int main()': divk.cpp:9:12: error: 'c' has not been declared int n, c, nrdiv=1, d=3, exp=0, a, ca; ^ divk.cpp:9:15: error: 'nrdiv' has not been declared int n, c, nrdiv=1, d=3, exp=0, a, ca; ^ divk.cpp:9:20: error: default arguments are only permitted for function parameters int n, c, nrdiv=1, d=3, exp=0, a, ca; ^ divk.cpp:9:24: error: 'd' has not been declared int n, c, nrdiv=1, d=3, exp=0, a, ca; ^ divk.cpp:9:25: error: default arguments are only permitted for function parameters int n, c, nrdiv=1, d=3, exp=0, a, ca; ^ divk.cpp:9:29: error: 'exp' has not been declared int n, c, nrdiv=1, d=3, exp=0, a, ca; ^ divk.cpp:9:32: error: default arguments are only permitted for function parameters int n, c, nrdiv=1, d=3, exp=0, a, ca; ^ divk.cpp:9:36: error: 'a' has not been declared int n, c, nrdiv=1, d=3, exp=0, a, ca; ^ divk.cpp:9:39: error: 'ca' has not been declared int n, c, nrdiv=1, d=3, exp=0, a, ca; ^ divk.cpp:9:41: error: expected ')' before ';' token int n, c, nrdiv=1, d=3, exp=0, a, ca; ^ divk.cpp:9:41: error: expected ')' before ';' token divk.cpp:10:11: error: 'n' was not declared in this scope cin>> n>> c; ^ divk.cpp:10:15: error: 'c' was not declared in this scope cin>> n>> c; ^ divk.cpp:13:14: error: 'a' was not declared in this scope cin>>a ; ca=a; ^ divk.cpp:13:18: error: 'ca' was not declared in this scope cin>>a ; ca=a; ^ divk.cpp:15:13: error: 'exp' was not declared in this scope exp++; a=a/2; ^ divk.cpp:17:9: error: 'nrdiv' was not declared in this scope nrdiv=nrdiv*(exp+1); ^ divk.cpp:17:22: error: 'exp' was not declared in this scope nrdiv=nrdiv*(exp+1); ^ divk.cpp:19:22: error: 'd' was not declared in this scope while(a>1 && d*d<=a) ^ divk.cpp:35:9: error: 'd' was not declared in this scope d=3; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema DivK 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ă.