#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 | #63364106 | Utilizator | |
| Fișier | asociat.cpp | Dimensiune | 433 B |
| Data încărcării | 27 Februarie 2026, 22:36 | Scor/rezultat | 70 puncte |
asociat.cpp: In function 'int main()': asociat.cpp:6:5: warning: variable 'c1' set but not used [-Wunused-but-set-variable] int c1,c2,s1,s2; ^ asociat.cpp:6:8: warning: variable 'c2' set but not used [-Wunused-but-set-variable] int c1,c2,s1,s2; ^ asociat.cpp:21:50: warning: 's2' may be used uninitialized in this function [-Wmaybe-uninitialized] if((s1%2 == 0||s1%3 == 0||s1%5 == 0 )&&(s2%2 == 0||s2%3 == 0||s2%5 == 0)) ^ asociat.cpp:21:14: warning: 's1' may be used uninitialized in this function [-Wmaybe-uninitialized] if((s1%2 == 0||s1%3 == 0||s1%5 == 0 )&&(s2%2 == 0||s2%3 == 0||s2%5 == 0)) ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0 secunde | OK. | 10 | 10 | Exemplu | |
| 2 | 0 secunde | OK. | 10 | 10 | Exemplu | |
| 3 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
| 4 | 0 secunde | OK. | 20 | 20 | ||
| 5 | 0 secunde | OK. | 20 | 20 | ||
| 6 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
| 7 | 0 secunde | OK. | 10 | 10 | ||
| Punctaj total | 70 | |||||
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ă.