#3210
Cumparaturi
O cutie cu bomboane costă B
lei. Gigel are S
lei. Determinați câte cutii cu bomboane poate cumpăra Gigel și câți lei trebuie să mai primească pentru a cumpăra încă o cutie.
Problema | Cumparaturi | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #52545236 | Utilizator | |
Fișier | cumparaturi.cpp | Dimensiune | 780 B |
Data încărcării | 02 Octombrie 2024, 20:41 | Scor / rezultat | Eroare de compilare |
cumparaturi.cpp:1:1: error: stray '\310' in program Cerința ^ cumparaturi.cpp:1:1: error: stray '\233' in program cumparaturi.cpp:2:1: error: stray '\304' in program O cutie cu bomboane costă B lei. Gigel are S lei. Determinați câte cutii cu bomboane poate cumpăra Gigel și câți lei trebuie să mai primească pentru a cumpăra încă o cutie. ^ cumparaturi.cpp:2:1: error: stray '\203' in program cumparaturi.cpp:2:1: error: stray '\310' in program cumparaturi.cpp:2:1: error: stray '\233' in program cumparaturi.cpp:2:1: error: stray '\303' in program cumparaturi.cpp:2:1: error: stray '\242' in program cumparaturi.cpp:2:1: error: stray '\304' in program cumparaturi.cpp:2:1: error: stray '\203' in program cumparaturi.cpp:2:1: error: stray '\310' in program cumparaturi.cpp:2:1: error: stray '\231' in program cumparaturi.cpp:2:1: error: stray '\303' in program cumparaturi.cpp:2:1: error: stray '\242' in program cumparaturi.cpp:2:1: error: stray '\310' in program cumparaturi.cpp:2:1: error: stray '\233' in program cumparaturi.cpp:2:1: error: stray '\304' in program cumparaturi.cpp:2:1: error: stray '\203' in program cumparaturi.cpp:2:1: error: stray '\304' in program cumparaturi.cpp:2:1: error: stray '\203' in program cumparaturi.cpp:2:1: error: stray '\304' in program cumparaturi.cpp:2:1: error: stray '\203' in program cumparaturi.cpp:2:1: error: stray '\303' in program cumparaturi.cpp:2:1: error: stray '\256' in program cumparaturi.cpp:2:1: error: stray '\304' in program cumparaturi.cpp:2:1: error: stray '\203' in program cumparaturi.cpp:5:1: error: stray '\310' in program Programul citește de la tastatură numerele naturale B S. ^ cumparaturi.cpp:5:1: error: stray '\231' in program cumparaturi.cpp:5:1: error: stray '\304' in program cumparaturi.cpp:5:1: error: stray '\203' in program cumparaturi.cpp:7:1: error: stray '\310' in program Date de ieșire ^ cumparaturi.cpp:7:1: error: stray '\231' in program cumparaturi.cpp:8:1: error: stray '\310' in program Programul afișează pe ecran numerele C P, separate printr-un spațiu, reprezentând numărul de cutii cu bomboane pe care Gigel le poate cumpăra cu S lei, respectiv suma necesară pentru a cumpăra încă o cutie. ^ cumparaturi.cpp:8:1: error: stray '\231' in program cumparaturi.cpp:8:1: error: stray '\304' in program cumparaturi.cpp:8:1: error: stray '\203' in program cumparaturi.cpp:8:1: error: stray '\310' in program cumparaturi.cpp:8:1: error: stray '\233' in program cumparaturi.cpp:8:1: error: stray '\303' in program cumparaturi.cpp:8:1: error: stray '\242' in program cumparaturi.cpp:8:1: error: stray '\304' in program cumparaturi.cpp:8:1: error: stray '\203' in program cumparaturi.cpp:8:1: error: stray '\304' in program cumparaturi.cpp:8:1: error: stray '\203' in program cumparaturi.cpp:8:1: error: stray '\304' in program cumparaturi.cpp:8:1: error: stray '\203' in program cumparaturi.cpp:8:1: error: stray '\304' in program cumparaturi.cpp:8:1: error: stray '\203' in program cumparaturi.cpp:8:1: error: stray '\303' in program cumparaturi.cpp:8:1: error: stray '\256' in program cumparaturi.cpp:8:1: error: stray '\304' in program cumparaturi.cpp:8:1: error: stray '\203' in program cumparaturi.cpp:10:1: error: stray '\310' in program Restricții și precizări ^ cumparaturi.cpp:10:1: error: stray '\233' in program cumparaturi.cpp:10:1: error: stray '\310' in program cumparaturi.cpp:10:1: error: stray '\231' in program cumparaturi.cpp:10:1: error: stray '\304' in program cumparaturi.cpp:10:1: error: stray '\203' in program cumparaturi.cpp:11:1: error: stray '\342' in program 1 ≤ B,S ≤ 1.000.000.000 ^ cumparaturi.cpp:11:1: error: stray '\211' in program cumparaturi.cpp:11:1: error: stray '\244' in program cumparaturi.cpp:11:1: error: stray '\342' in program cumparaturi.cpp:11:1: error: stray '\211' in program cumparaturi.cpp:11:1: error: stray '\244' in program cumparaturi.cpp:11:15: error: too many decimal points in number 1 ≤ B,S ≤ 1.000.000.000 ^ cumparaturi.cpp:16:1: error: stray '\310' in program Ieșire ^ cumparaturi.cpp:16:1: error: stray '\231' in program cumparaturi.cpp:19:1: error: stray '\310' in program Explicație ^ cumparaturi.cpp:19:1: error: stray '\233' in program cumparaturi.cpp:20:1: error: stray '\304' in program Gigel are 9 lei, iar o cutie cu bomboane costă 4 lei. Poate cumpăra 2 cutii, rămânând 1 leu. Pentru încă o cutie, Gigel are nevoie de încă 3 lei. ^ cumparaturi.cpp:20:1: error: stray '\203' in program cumparaturi.cpp:20:1: error: stray '\304' in program cumparaturi.cpp:20:1: error: stray '\203' in program cumparaturi.cpp:20:1: error: stray '\304' in program cumparaturi.cpp:20:1: error: stray '\203' in program cumparaturi.cpp:20:1: error: stray '\303' in program cumparaturi.cpp:20:1: error: stray '\242' in program cumparaturi.cpp:20:1: error: stray '\303' in program cumparaturi.cpp:20:1: error: stray '\242' in program cumparaturi.cpp:20:1: error: stray '\303' in program cumparaturi.cpp:20:1: error: stray '\256' in program cumparaturi.cpp:20:1: error: stray '\304' in program cumparaturi.cpp:20:1: error: stray '\203' in program cumparaturi.cpp:20:1: error: stray '\303' in program cumparaturi.cpp:20:1: error: stray '\256' in program cumparaturi.cpp:20:1: error: stray '\304' in program cumparaturi.cpp:20:1: error: stray '\203' in program cumparaturi.cpp:1:1: error: 'Cerin' does not name a type Cerința ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Cumparaturi 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ă.