#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 | #64330420 | Utilizator | |
| Fișier | numere8.cpp | Dimensiune | 239 B |
| Data încărcării | 30 Aprilie 2026, 08:35 | Scor/rezultat | Eroare de compilare |
numere8.cpp:4:9: error: expected unqualified-id before ‘.’ token 4 | ifstream.in ("numere 8.in"); | ^ numere8.cpp:5:9: error: expected unqualified-id before ‘.’ token 5 | ofstream.out("numere 8.out"); | ^ numere8.cpp: In function ‘int main()’: numere8.cpp:8:7: error: ‘in’ was not declared in this scope; did you mean ‘int’? 8 | while(in>>m) | ^~ | int numere8.cpp:10:2: warning: capture of variable ‘m’ with non-automatic storage duration 10 | [m]=1; | ^ numere8.cpp:3:5: note: ‘int m’ declared here 3 | int m,v[10000],i; | ^ numere8.cpp: In lambda function: numere8.cpp:10:4: error: expected ‘{’ before ‘=’ token 10 | [m]=1; | ^ numere8.cpp: In function ‘int main()’: numere8.cpp:10:5: error: no match for ‘operator=’ (operand types are ‘main()::<lambda()>’ and ‘int’) 10 | [m]=1; | ^ numere8.cpp:10:3: note: candidate: ‘main()::<lambda()>& main()::<lambda()>::operator=(const main()::<lambda()>&)’ (deleted) 10 | [m]=1; | ^ numere8.cpp:10:3: note: no known conversion for argument 1 from ‘int’ to ‘const main()::<lambda()>&’ numere8.cpp:14:8: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 14 | if(v[i]=0) | ~~~~^~ numere8.cpp:15:5: error: ‘out’ was not declared in this scope 15 | out<<i<<" "; | ^~~ numere8.cpp:14:1: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 14 | if(v[i]=0) | ^~ numere8.cpp:16:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 16 | return 0; | ^~~~~~ numere8.cpp:17:2: error: expected ‘}’ at end of input 17 | } | ^ numere8.cpp:7:1: note: to match this ‘{’ 7 | { | ^
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ă.