#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 | #51684938 | Utilizator | |
Fișier | nmod25.cpp | Dimensiune | 322 B |
Data încărcării | 02 August 2024, 18:08 | Scor / rezultat | Eroare de compilare |
nmod25.cpp:5:1: error: 'ifstream' does not name a type ifstream f("nmod25.in") ^ nmod25.cpp: In function 'int main()': nmod25.cpp:14:5: error: 'f' was not declared in this scope f>>N>>k; ^ nmod25.cpp:15:20: error: invalid operands of types 'long long int' and 'double' to binary 'operator%' if (N% pow(2, k)==0) g<<"DA"<<endl; ^ nmod25.cpp:15:26: error: 'g' was not declared in this scope if (N% pow(2, k)==0) g<<"DA"<<endl; ^ nmod25.cpp:15:35: error: 'endl' was not declared in this scope if (N% pow(2, k)==0) g<<"DA"<<endl; ^ nmod25.cpp:15:35: note: suggested alternative: In file included from /usr/include/c++/4.8/iostream:39:0, from nmod25.cpp:1: /usr/include/c++/4.8/ostream:564:5: note: 'std::endl' endl(basic_ostream<_CharT, _Traits>& __os) ^ nmod25.cpp:16:10: error: 'g' was not declared in this scope else g<<"NU"<<endl; ^ nmod25.cpp:16:19: error: 'endl' was not declared in this scope else g<<"NU"<<endl; ^ nmod25.cpp:16:19: note: suggested alternative: In file included from /usr/include/c++/4.8/iostream:39:0, from nmod25.cpp:1: /usr/include/c++/4.8/ostream:564:5: note: 'std::endl' endl(basic_ostream<_CharT, _Traits>& __os) ^ nmod25.cpp:17:20: error: invalid operands of types 'long long int' and 'double' to binary 'operator%' if (N% pow(5, k)==0) g<<"DA"; ^ nmod25.cpp:17:26: error: 'g' was not declared in this scope if (N% pow(5, k)==0) g<<"DA"; ^ nmod25.cpp:18: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ă.