#816
Determinați câte sticle de x litri cu apă trebuie deschise pentru a umple un vas de y litri.
| Problema | Sticle | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64111334 | Utilizator | |
| Fișier | sticle.cpp | Dimensiune | 181 B |
| Data încărcării | 17 Aprilie 2026, 14:25 | Scor/rezultat | Eroare de compilare |
sticle.cpp: In function ‘int main()’: sticle.cpp:9:13: error: expected primary-expression before ‘=’ token 9 | if(x%y!==o) | ^ sticle.cpp:9:14: error: ‘o’ was not declared in this scope 9 | if(x%y!==o) | ^ sticle.cpp:10:21: error: no match for ‘operator=’ (operand types are ‘std::basic_ostream<char>’ and ‘int’) 10 | cout<<n=x/y+1 | ^ In file included from /usr/include/c++/13/iostream:41, from sticle.cpp:1: /usr/include/c++/13/ostream:449:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator=(std::basic_ostream<_CharT, _Traits>&&) [with _CharT = char; _Traits = std::char_traits<char>]’ 449 | operator=(basic_ostream&& __rhs) | ^~~~~~~~ /usr/include/c++/13/ostream:449:33: note: no known conversion for argument 1 from ‘int’ to ‘std::basic_ostream<char>&&’ 449 | operator=(basic_ostream&& __rhs) | ~~~~~~~~~~~~~~~~^~~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Sticle 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ă.