#4867
Două numere naturale se numesc asociate dacă sumele cifrelor lor se împart exact la 2 sau la 3 sau la 5.
Date două numere naturale a și b, să se verifice dacă sunt asociate.
Concurs de selecție clasa a 9-a Centru de Excelență in Informatică 2025 - Vaslui
| Problema | Asociat | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64507074 | Utilizator | |
| Fișier | asociat.cpp | Dimensiune | 559 B |
| Data încărcării | 11 Mai 2026, 18:38 | Scor/rezultat | 100 puncte |
asociat.cpp: In function ‘int main()’: asociat.cpp:26:4: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 26 | if(sa%5==0) | ^~ asociat.cpp:28:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 28 | if(sb%2==0) | ^~ asociat.cpp:34:4: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 34 | if(sb%5==0) | ^~ asociat.cpp:36:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 36 | if(oka==1&&okb==1) | ^~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 10 | 10 | Exemplu | |
| 2 | 0.001 secunde | OK. | 10 | 10 | Exemplu | |
| 3 | 0.001 secunde | OK. | 10 | 10 | ||
| 4 | 0.001 secunde | OK. | 20 | 20 | ||
| 5 | 0.001 secunde | OK. | 20 | 20 | ||
| 6 | 0.001 secunde | OK. | 20 | 20 | ||
| 7 | 0.001 secunde | OK. | 10 | 10 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Asociat 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ă.