#64
NumarPerfect
Să se scrie un program care verifică dacă un număr natural citit de la tastatură este număr perfect.
Problema | NumarPerfect | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51563726 | Utilizator | |
Fișier | numarperfect.cpp | Dimensiune | 525 B |
Data încărcării | 12 Iulie 2024, 01:35 | Scor / rezultat | 50 puncte |
numarperfect.cpp: In function 'int main()': numarperfect.cpp:7:12: warning: unused variable 'x' [-Wunused-variable] int n, x, a, b, Sa=0, Sb=0, ogl=0, d, d1, S=0, ct=0, ctmaixmin=0, ctmax=0, mind=100000, mind1=100000, ok=0; ^ numarperfect.cpp:7:15: warning: unused variable 'a' [-Wunused-variable] int n, x, a, b, Sa=0, Sb=0, ogl=0, d, d1, S=0, ct=0, ctmaixmin=0, ctmax=0, mind=100000, mind1=100000, ok=0; ^ numarperfect.cpp:7:18: warning: unused variable 'b' [-Wunused-variable] int n, x, a, b, Sa=0, Sb=0, ogl=0, d, d1, S=0, ct=0, ctmaixmin=0, ctmax=0, mind=100000, mind1=100000, ok=0; ^ numarperfect.cpp:7:21: warning: unused variable 'Sa' [-Wunused-variable] int n, x, a, b, Sa=0, Sb=0, ogl=0, d, d1, S=0, ct=0, ctmaixmin=0, ctmax=0, mind=100000, mind1=100000, ok=0; ^ numarperfect.cpp:7:27: warning: unused variable 'Sb' [-Wunused-variable] int n, x, a, b, Sa=0, Sb=0, ogl=0, d, d1, S=0, ct=0, ctmaixmin=0, ctmax=0, mind=100000, mind1=100000, ok=0; ^ numarperfect.cpp:7:33: warning: unused variable 'ogl' [-Wunused-variable] int n, x, a, b, Sa=0, Sb=0, ogl=0, d, d1, S=0, ct=0, ctmaixmin=0, ctmax=0, mind=100000, mind1=100000, ok=0; ^ numarperfect.cpp:7:52: warning: unused variable 'ct' [-Wunused-variable] int n, x, a, b, Sa=0, Sb=0, ogl=0, d, d1, S=0, ct=0, ctmaixmin=0, ctmax=0, mind=100000, mind1=100000, ok=0; ^ numarperfect.cpp:7:58: warning: unused variable 'ctmaixmin' [-Wunused-variable] int n, x, a, b, Sa=0, Sb=0, ogl=0, d, d1, S=0, ct=0, ctmaixmin=0, ctmax=0, mind=100000, mind1=100000, ok=0; ^ numarperfect.cpp:7:71: warning: unused variable 'ctmax' [-Wunused-variable] int n, x, a, b, Sa=0, Sb=0, ogl=0, d, d1, S=0, ct=0, ctmaixmin=0, ctmax=0, mind=100000, mind1=100000, ok=0; ^ numarperfect.cpp:7:80: warning: unused variable 'mind' [-Wunused-variable] int n, x, a, b, Sa=0, Sb=0, ogl=0, d, d1, S=0, ct=0, ctmaixmin=0, ctmax=0, mind=100000, mind1=100000, ok=0; ^ numarperfect.cpp:7:93: warning: unused variable 'mind1' [-Wunused-variable] int n, x, a, b, Sa=0, Sb=0, ogl=0, d, d1, S=0, ct=0, ctmaixmin=0, ctmax=0, mind=100000, mind1=100000, ok=0; ^ numarperfect.cpp:7:107: warning: unused variable 'ok' [-Wunused-variable] int n, x, a, b, Sa=0, Sb=0, ogl=0, d, d1, S=0, ct=0, ctmaixmin=0, ctmax=0, mind=100000, mind1=100000, ok=0; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 10 | 10 | Exemplu | |
2 | 0 secunde | OK. | 10 | 10 | ||
3 | 0 secunde | OK. | 10 | 10 | ||
4 | 0 secunde | OK. | 10 | 10 | ||
5 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
6 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
7 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
8 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
9 | 0 secunde | OK. | 10 | 10 | ||
10 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
Punctaj total | 50 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema NumarPerfect 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ă.