#3335
Toffeeman vrea să împartă c caramele la p prichindei astfel încât primul să ia k caramele, al doilea k+1 caramele, al treilea k+2 caramele, şi aşa mai departe. De asemenea, Toffeeman vrea să rămână cu cât mai puţine caramele. Aflaţi cu câte caramele rămâne Toffeeman.
| Problema | caramele | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64874189 | Utilizator | |
| Fișier | caramele.cpp | Dimensiune | 188 B |
| Data încărcării | 08 Iunie 2026, 21:53 | Scor/rezultat | 0 puncte |
In file included from /usr/include/c++/13/iostream:41, from caramele.cpp:1: In member function ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>]’, inlined from ‘int main()’ at caramele.cpp:9:11: /usr/include/c++/13/ostream:204:25: warning: ‘r’ is used uninitialized [-Wuninitialized] 204 | { return _M_insert(__n); } | ~~~~~~~~~^~~~~ caramele.cpp: In function ‘int main()’: caramele.cpp:4:19: note: ‘r’ was declared here 4 | long long c,p,r; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 1 | 0 | Exemplu | |
| 2 | 0.002 secunde | Raspuns gresit. | 1 | 0 | ||
| 3 | 0.002 secunde | Raspuns gresit. | 1 | 0 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 1 | 0 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 1 | 0 | ||
| 6 | 0.001 secunde | Raspuns gresit. | 1 | 0 | ||
| 7 | 0.001 secunde | Raspuns gresit. | 1 | 0 | ||
| 8 | 0.001 secunde | Raspuns gresit. | 1 | 0 | ||
| 9 | 0.001 secunde | Raspuns gresit. | 2 | 0 | ||
| 10 | 0.001 secunde | Raspuns gresit. | 2 | 0 | ||
| 11 | 0.001 secunde | Raspuns gresit. | 2 | 0 | ||
| 12 | 0.001 secunde | Raspuns gresit. | 2 | 0 | ||
| 13 | 0.002 secunde | Raspuns gresit. | 2 | 0 | ||
| 14 | 0.001 secunde | Raspuns gresit. | 2 | 0 | ||
| 15 | 0.002 secunde | Raspuns gresit. | 3 | 0 | ||
| 16 | 0.001 secunde | Raspuns gresit. | 3 | 0 | ||
| 17 | 0.001 secunde | Raspuns gresit. | 3 | 0 | ||
| 18 | 0.002 secunde | Raspuns gresit. | 4 | 0 | ||
| 19 | 0.002 secunde | Raspuns gresit. | 5 | 0 | ||
| 20 | 0.001 secunde | Raspuns gresit. | 6 | 0 | ||
| 21 | 0.001 secunde | Raspuns gresit. | 7 | 0 | ||
| 22 | 0.001 secunde | Raspuns gresit. | 8 | 0 | ||
| 23 | 0.001 secunde | Raspuns gresit. | 9 | 0 | ||
| 24 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 25 | 0.001 secunde | Raspuns gresit. | 11 | 0 | ||
| 26 | 0.001 secunde | Raspuns gresit. | 5 | 0 | ||
| 27 | 0.001 secunde | Raspuns gresit. | 3 | 0 | ||
| 28 | 0.001 secunde | Raspuns gresit. | 1 | 0 | ||
| 29 | 0.001 secunde | Raspuns gresit. | 1 | 0 | ||
| 30 | 0.002 secunde | Raspuns gresit. | 1 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema caramele 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ă.