#1420
Se dau n
numere naturale divizibile cu 9
, acestea se concatenează, se calculează suma cifrelor numărului obţinut, apoi suma cifrelor sumei obţinute şi tot aşa pînă se obţine o cifră, aceasta se înmulţeşte cu 7
obţinându-se un număr m
, apoi se cere al m
-lea număr triunghiular.
Problema | HappyNewYear | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.01 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58004636 | Utilizator | |
Fișier | happynewyear.cpp | Dimensiune | 984 B |
Data încărcării | 07 Mai 2025, 19:10 | Scor / rezultat | 60 puncte |
happynewyear.cpp: In function 'int main()': happynewyear.cpp:22:22: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long int*' [-Wformat=] scanf("%d",&x); ///x=NR.CURENT ^ happynewyear.cpp:52:18: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=] printf("%d",A); ///cout<<A; ^ happynewyear.cpp:16:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&n); ///cin>>n; ^ happynewyear.cpp:22:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&x); ///x=NR.CURENT ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 20 | 20 | Exemplu | |
2 | 0 secunde | OK. | 20 | 20 | ||
3 | 0 secunde | OK. | 20 | 20 | ||
4 | Depășit | Limita de timp depășită | 20 | 0 | ||
5 | Depășit | Limita de timp depășită | 20 | 0 | ||
Punctaj total | 60 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema HappyNewYear 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ă.