#525
Numere1
Se dau n
numere naturale. Determinaţi cele mai mari două numere cu trei cifre care nu apar printre numerele date.
Problema | Numere1 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54579862 | Utilizator | |
Fișier | numere1.cpp | Dimensiune | 492 B |
Data încărcării | 02 Decembrie 2024, 23:06 | Scor / rezultat | Eroare de compilare |
numere1.cpp:1:1: error: 'include' does not name a type include <iostream> ^ numere1.cpp:4:12: error: expected initializer before 'n' int v[1000]n,nr,i,a,b; ^ numere1.cpp: In function 'int main()': numere1.cpp:8:5: error: 'cin' was not declared in this scope cin >> n; ^ numere1.cpp:8:13: error: 'n' was not declared in this scope cin >> n; ^ numere1.cpp:11:16: error: 'x' was not declared in this scope cin >> x; ^ numere1.cpp:12:12: error: 'nr' was not declared in this scope if(nr > 99 && nr < 1000) ^ numere1.cpp:13:13: error: 'v' was not declared in this scope v[nr] = 1; ^ numere1.cpp:15:9: error: 'i' was not declared in this scope for(i = 999 ; i > 99 && a == 0 ; i --) ^ numere1.cpp:15:29: error: 'a' was not declared in this scope for(i = 999 ; i > 99 && a == 0 ; i --) ^ numere1.cpp:16:12: error: 'v' was not declared in this scope if(v[i] == 0) ^ numere1.cpp:17:16: error: 'b' was not declared in this scope if(b == 0) ^ numere1.cpp:16:11: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(v[i] == 0) ^ numere1.cpp:21:8: error: 'a' was not declared in this scope if(a != 0) ^ numere1.cpp:22:9: error: 'cout' was not declared in this scope cout << a << " " << b; ^ numere1.cpp:22:29: error: 'b' was not declared in this scope cout << a << " " << b; ^ numere1.cpp:24:9: error: 'cout' was not declared in this scope cout << "NU EXISTA"; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Numere1 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ă.