#1922
Nmod25
Se dau numerele naturale N
și X
. Aflați dacă N
este divizibil cu 2
X
și dacă N
este divizibil cu 5
X
.
Problema | Nmod25 | Operații I/O |
nmod25.in /nmod25.out
|
---|---|---|---|
Limita timp | 0.01 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51684949 | Utilizator | |
Fișier | nmod25.cpp | Dimensiune | 309 B |
Data încărcării | 02 August 2024, 18:11 | Scor / rezultat | Eroare de compilare |
nmod25.cpp:5:1: error: 'ifstream' does not name a type ifstream f("nmod25.in"); ^ nmod25.cpp:6:1: error: 'ofstream' does not name a type ofstream g("nmod25.out"); ^ nmod25.cpp: In function 'int main()': nmod25.cpp:13:5: error: 'f' was not declared in this scope f>>n>>x; ^ nmod25.cpp:14:20: error: invalid operands of types 'int' and '__gnu_cxx::__promote_2<int, int, double, double>::__type {aka double}' to binary 'operator%' if (n% pow(2, x)==0) g<<"DA"<<endl; ^ nmod25.cpp:14:26: error: 'g' was not declared in this scope if (n% pow(2, x)==0) g<<"DA"<<endl; ^ nmod25.cpp:15:10: error: 'g' was not declared in this scope else g<<"NU"<<endl; ^ nmod25.cpp:16:20: error: invalid operands of types 'int' and '__gnu_cxx::__promote_2<int, int, double, double>::__type {aka double}' to binary 'operator%' if (n% pow(5, x)==0) g<<"DA"; ^ nmod25.cpp:16:26: error: 'g' was not declared in this scope if (n% pow(5, x)==0) g<<"DA"; ^ nmod25.cpp:17:10: error: 'g' was not declared in this scope else g<<"NU"; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Nmod25 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ă.