#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 | #54846793 | Utilizator | |
Fișier | divk.cpp | Dimensiune | 773 B |
Data încărcării | 10 Decembrie 2024, 10:53 | Scor / rezultat | Eroare de compilare |
divk.cpp: In function 'int main()': divk.cpp:6:9: error: expected ';' before 'ofstream' ofstream("cout.out") ^ divk.cpp:12:12: error: 'n' was not declared in this scope cin >> n >> c ; ^ divk.cpp:12:17: error: 'c' was not declared in this scope cin >> n >> c ; ^ divk.cpp:15:14: error: 'a' was not declared in this scope cin>>a; ^ divk.cpp:16:9: error: 'ca' was not declared in this scope ca=a; ^ divk.cpp:17:22: error: 'd' was not declared in this scope while(a<1 && d*d<=a) ^ divk.cpp:20:14: error: 'exp' was not declared in this scope {exp++;a=a/d;} ^ divk.cpp:21:13: error: 'nrdiv' was not declared in this scope nrdiv=nrdiv*(exp+1); ^ divk.cpp:21:26: error: 'exp' was not declared in this scope nrdiv=nrdiv*(exp+1); ^ divk.cpp:25:16: error: 'nrdiv' was not declared in this scope if(a>1)nrdiv*=2; ^ divk.cpp:26:12: error: 'nrdiv' was not declared in this scope if(nrdiv>=<) ^ divk.cpp:26:19: error: expected primary-expression before '<' token if(nrdiv>=<) ^ divk.cpp:26:20: error: expected primary-expression before ')' token if(nrdiv>=<) ^ divk.cpp:28:9: error: 'nrdiv' was not declared in this scope nrdiv=1; ^ divk.cpp:29:9: error: 'exp' was not declared in this scope exp=0; ^ divk.cpp:30:9: error: 'd' was not declared in this scope d=2; ^
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ă.