#1005
Se dă o listă cu numere naturale. Să se determine numerele naturale nenule cu cel mult patru cifre care nu apar în lista dată.
| Problema | Numere8 | Operații I/O |
numere8.in/numere8.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64643494 | Utilizator | |
| Fișier | numere8.cpp | Dimensiune | 307 B |
| Data încărcării | 20 Mai 2026, 09:39 | Scor/rezultat | Eroare de compilare |
numere8.cpp:4:13: error: variable ‘std::ifstream fin’ has initializer but incomplete type 4 | ifstream fin("numere8.in"); | ^ numere8.cpp:5:14: error: variable ‘std::ofstream fout’ has initializer but incomplete type 5 | ofstream fout("numere8.out"); | ^ numere8.cpp: In function ‘int main()’: numere8.cpp:13:12: warning: init-statement in selection statements only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 13 | if(x>=0;x<=999;x++)ok=1; | ^ numere8.cpp:13:13: warning: statement has no effect [-Wunused-value] 13 | if(x>=0;x<=999;x++)ok=1; | ~^~~ numere8.cpp:13:23: error: expected ‘)’ before ‘;’ token 13 | if(x>=0;x<=999;x++)ok=1; | ~ ^ | ) numere8.cpp:13:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 13 | if(x>=0;x<=999;x++)ok=1; | ^~ numere8.cpp:13:24: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 13 | if(x>=0;x<=999;x++)ok=1; | ^ numere8.cpp:13:27: error: expected ‘;’ before ‘)’ token 13 | if(x>=0;x<=999;x++)ok=1; | ^ | ; numere8.cpp:15:8: warning: init-statement in selection statements only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 15 | if(i=9999;i>=0;i--) | ^ numere8.cpp:15:19: error: expected ‘)’ before ‘;’ token 15 | if(i=9999;i>=0;i--) | ~ ^ | ) numere8.cpp:15:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 15 | if(i=9999;i>=0;i--) | ^~ numere8.cpp:15:20: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 15 | if(i=9999;i>=0;i--) | ^ numere8.cpp:15:23: error: expected ‘;’ before ‘)’ token 15 | if(i=9999;i>=0;i--) | ^ | ;
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Numere8 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ă.