#2708
Se citesc n numere naturale. Determinați pentru fiecare dintre ele dacă este par sau impar.
| Problema | VerifParitate | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #49981040 | Utilizator | |
| Fișier | verifparitate.c | Dimensiune | 363 B |
| Data încărcării | 21 Martie 2024, 22:49 | Scor/rezultat | 20 puncte |
verifparitate.c: In function 'main': verifparitate.c:6:2: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'long unsigned int *' [-Wformat=] scanf("%d", &n); ^ verifparitate.c:9:3: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'long unsigned int *' [-Wformat=] scanf("%d", &x[i]); ^ verifparitate.c:10:21: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] if (1 & (x[i]>>0) == 0) ^ verifparitate.c:5:27: warning: variable 'p' set but not used [-Wunused-but-set-variable] unsigned long n, x[1001],p[1001]; ^ verifparitate.c:6:7: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &n); ^ verifparitate.c:9:8: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &x[i]); ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
| 3 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
| 4 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
| 5 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 20 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema VerifParitate 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ă.