#2311
Rapunzel
Rapunzel se află într-un turn înalt de N
metri. Flynn dorește să urce la ea și parcurge M1
metri de la răsărit până la asfințit, apoi, de la asfințit până la miezul nopții încă M2
metri. După câte zile ajunge Flynn la Rapunzel?
OLI 2015 - Timis - clasele V-VI
Problema | Rapunzel | Operații I/O |
rapunzel.in /rapunzel.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 8 MB
/
Stivă 8 MB
|
Id soluție | #53353339 | Utilizator | |
Fișier | rapunzel.cpp | Dimensiune | 1.59 KB |
Data încărcării | 25 Octombrie 2024, 15:43 | Scor / rezultat | Eroare de compilare |
rapunzel.cpp:1:1: error: stray '\304' in program Rapunzel s-a născut într-un ţinut îndepărtat într-un regat necunoscut. Mama vitregă a închis-o pe Rapunzel într-un turn foarte înalt ce avea N metri. Aici Rapunzel urma să-şi petreacă toată copilăria. ^ rapunzel.cpp:1:1: error: stray '\203' in program rapunzel.cpp:1:1: error: stray '\303' in program rapunzel.cpp:1:1: error: stray '\256' in program rapunzel.cpp:1:1: error: stray '\305' in program rapunzel.cpp:1:1: error: stray '\243' in program rapunzel.cpp:1:1: error: stray '\303' in program rapunzel.cpp:1:1: error: stray '\256' in program rapunzel.cpp:1:1: error: stray '\304' in program rapunzel.cpp:1:1: error: stray '\203' in program rapunzel.cpp:1:1: error: stray '\303' in program rapunzel.cpp:1:1: error: stray '\256' in program rapunzel.cpp:1:1: error: stray '\304' in program rapunzel.cpp:1:1: error: stray '\203' in program rapunzel.cpp:1:1: error: stray '\303' in program rapunzel.cpp:1:1: error: stray '\256' in program rapunzel.cpp:1:1: error: stray '\303' in program rapunzel.cpp:1:1: error: stray '\256' in program rapunzel.cpp:1:1: error: stray '\303' in program rapunzel.cpp:1:1: error: stray '\256' in program rapunzel.cpp:1:1: error: stray '\304' in program rapunzel.cpp:1:1: error: stray '\203' in program rapunzel.cpp:1:1: error: stray '\305' in program rapunzel.cpp:1:1: error: stray '\237' in program rapunzel.cpp:1:1: error: stray '\304' in program rapunzel.cpp:1:1: error: stray '\203' in program rapunzel.cpp:1:1: error: stray '\304' in program rapunzel.cpp:1:1: error: stray '\203' in program rapunzel.cpp:1:1: error: stray '\304' in program rapunzel.cpp:1:1: error: stray '\203' in program rapunzel.cpp:3:1: error: stray '\305' in program Pentru a-i trece timpul mai uşor, Rapunzel cânta din zori şi până în seară, cântecul ei auzindu-se în tot ţinutul. Atras de vocea de privighetoare a fetei, Flynn Rider şi-a propus să se caţere pe pereţii exterior ai turnului şi în fiecare zi să procedeze astfel: de la răsăritul până la asfinţitul soarelui să parcurgă M1 metri iar apoi, de la asfinţit până la miezul nopţii încă M2 metri. ^ rapunzel.cpp:3:1: error: stray '\237' in program rapunzel.cpp:3:1: error: stray '\303' in program rapunzel.cpp:3:1: error: stray '\242' in program rapunzel.cpp:3:1: error: stray '\305' in program rapunzel.cpp:3:1: error: stray '\237' in program rapunzel.cpp:3:1: error: stray '\303' in program rapunzel.cpp:3:1: error: stray '\242' in program rapunzel.cpp:3:1: error: stray '\304' in program rapunzel.cpp:3:1: error: stray '\203' in program rapunzel.cpp:3:1: error: stray '\303' in program rapunzel.cpp:3:1: error: stray '\256' in program rapunzel.cpp:3:1: error: stray '\304' in program rapunzel.cpp:3:1: error: stray '\203' in program rapunzel.cpp:3:1: error: stray '\303' in program rapunzel.cpp:3:1: error: stray '\242' in program rapunzel.cpp:3:1: error: stray '\303' in program rapunzel.cpp:3:1: error: stray '\256' in program rapunzel.cpp:3:1: error: stray '\305' in program rapunzel.cpp:3:1: error: stray '\243' in program rapunzel.cpp:3:1: error: stray '\305' in program rapunzel.cpp:3:1: error: stray '\237' in program rapunzel.cpp:3:1: error: stray '\304' in program rapunzel.cpp:3:1: error: stray '\203' in program rapunzel.cpp:3:1: error: stray '\305' in program rapunzel.cpp:3:1: error: stray '\243' in program rapunzel.cpp:3:1: error: stray '\305' in program rapunzel.cpp:3:1: error: stray '\243' in program rapunzel.cpp:3:1: error: stray '\305' in program rapunzel.cpp:3:1: error: stray '\237' in program rapunzel.cpp:3:1: error: stray '\303' in program rapunzel.cpp:3:1: error: stray '\256' in program rapunzel.cpp:3:1: error: stray '\304' in program rapunzel.cpp:3:1: error: stray '\203' in program rapunzel.cpp:3:1: error: stray '\304' in program rapunzel.cpp:3:1: error: stray '\203' in program rapunzel.cpp:3:1: error: stray '\304' in program rapunzel.cpp:3:1: error: stray '\203' in program rapunzel.cpp:3:1: error: stray '\303' in program rapunzel.cpp:3:1: error: stray '\242' in program rapunzel.cpp:3:1: error: stray '\304' in program rapunzel.cpp:3:1: error: stray '\203' in program rapunzel.cpp:3:1: error: stray '\305' in program rapunzel.cpp:3:1: error: stray '\243' in program rapunzel.cpp:3:1: error: stray '\304' in program rapunzel.cpp:3:1: error: stray '\203' in program rapunzel.cpp:3:1: error: stray '\304' in program rapunzel.cpp:3:1: error: stray '\203' in program rapunzel.cpp:3:1: error: stray '\305' in program rapunzel.cpp:3:1: error: stray '\243' in program rapunzel.cpp:3:1: error: stray '\303' in program rapunzel.cpp:3:1: error: stray '\242' in program rapunzel.cpp:3:1: error: stray '\304' in program rapunzel.cpp:3:1: error: stray '\203' in program rapunzel.cpp:3:1: error: stray '\305' in program rapunzel.cpp:3:1: error: stray '\243' in program rapunzel.cpp:3:1: error: stray '\303' in program rapunzel.cpp:3:1: error: stray '\256' in program rapunzel.cpp:3:1: error: stray '\304' in program rapunzel.cpp:3:1: error: stray '\203' in program rapunzel.cpp:6:1: error: stray '\305' in program Scrieţi un program care determină după câte zile ajunge Flynn Rider la Rapunzel. ^ rapunzel.cpp:6:1: error: stray '\243' in program rapunzel.cpp:6:1: error: stray '\304' in program rapunzel.cpp:6:1: error: stray '\203' in program rapunzel.cpp:6:1: error: stray '\304' in program rapunzel.cpp:6:1: error: stray '\203' in program rapunzel.cpp:6:1: error: stray '\303' in program rapunzel.cpp:6:1: error: stray '\242' in program rapunzel.cpp:9:1: error: stray '\305' in program De pe prima linie a fişierului rapunzel.in se citesc trei numere naturale N, M1 şi M2, în această ordine, despărţite prin câte un spaţiu, având semnificaţia din enunţ. ^ rapunzel.cpp:9:1: error: stray '\237' in program rapunzel.cpp:9:1: error: stray '\305' in program rapunzel.cpp:9:1: error: stray '\237' in program rapunzel.cpp:9:1: error: stray '\303' in program rapunzel.cpp:9:1: error: stray '\256' in program rapunzel.cpp:9:1: error: stray '\304' in program rapunzel.cpp:9:1: error: stray '\203' in program rapunzel.cpp:9:1: error: stray '\304' in program rapunzel.cpp:9:1: error: stray '\203' in program rapunzel.cpp:9:1: error: stray '\305' in program rapunzel.cpp:9:1: error: stray '\243' in program rapunzel.cpp:9:1: error: stray '\303' in program rapunzel.cpp:9:1: error: stray '\242' in program rapunzel.cpp:9:1: error: stray '\305' in program rapunzel.cpp:9:1: error: stray '\243' in program rapunzel.cpp:9:1: error: stray '\303' in program rapunzel.cpp:9:1: error: stray '\242' in program rapunzel.cpp:9:1: error: stray '\305' in program rapunzel.cpp:9:1: error: stray '\243' in program rapunzel.cpp:9:1: error: stray '\305' in program rapunzel.cpp:9:1: error: stray '\243' in program rapunzel.cpp:11:1: error: stray '\310' in program Date de ieșire ^ rapunzel.cpp:11:1: error: stray '\231' in program rapunzel.cpp:12:1: error: stray '\303' in program În fişierul rapunzel.out se va afişa, pe prima linie, un număr natural ce reprezintă numărul de zile necesar lui Flynn Rider pentru a ajunge la Rapunzel. ^ rapunzel.cpp:12:1: error: stray '\216' in program rapunzel.cpp:12:1: error: stray '\305' in program rapunzel.cpp:12:1: error: stray '\237' in program rapunzel.cpp:12:1: error: stray '\305' in program rapunzel.cpp:12:1: error: stray '\237' in program rapunzel.cpp:12:1: error: stray '\304' in program rapunzel.cpp:12:1: error: stray '\203' in program rapunzel.cpp:12:1: error: stray '\304' in program rapunzel.cpp:12:1: error: stray '\203' in program rapunzel.cpp:12:1: error: stray '\304' in program rapunzel.cpp:12:1: error: stray '\203' in program rapunzel.cpp:14:1: error: stray '\310' in program Restricții și precizări ^ rapunzel.cpp:14:1: error: stray '\233' in program rapunzel.cpp:14:1: error: stray '\310' in program rapunzel.cpp:14:1: error: stray '\231' in program rapunzel.cpp:14:1: error: stray '\304' in program rapunzel.cpp:14:1: error: stray '\203' in program rapunzel.cpp:15:1: error: stray '\342' in program 1 ≤ n ≤ 5 000 000 000 ^ rapunzel.cpp:15:1: error: stray '\211' in program rapunzel.cpp:15:1: error: stray '\244' in program rapunzel.cpp:15:1: error: stray '\342' in program rapunzel.cpp:15:1: error: stray '\211' in program rapunzel.cpp:15:1: error: stray '\244' in program rapunzel.cpp:16:1: error: stray '\342' in program 1 ≤ M1, M2 ≤ 2 500 ^ rapunzel.cpp:16:1: error: stray '\211' in program rapunzel.cpp:16:1: error: stray '\244' in program rapunzel.cpp:16:1: error: stray '\342' in program rapunzel.cpp:16:1: error: stray '\211' in program rapunzel.cpp:16:1: error: stray '\244' in program rapunzel.cpp:24:1: error: stray '\310' in program Explicație ^ rapunzel.cpp:24:1: error: stray '\233' in program rapunzel.cpp:25:1: error: stray '\303' in program Turnul are înălţimea de 7 metri. Flynn urcă până la asfinţit 3 metri iar apoi încă 4 metri. După o zi el va ajunge la Rapunzel. ^ rapunzel.cpp:25:1: error: stray '\256' in program rapunzel.cpp:25:1: error: stray '\304' in program rapunzel.cpp:25:1: error: stray '\203' in program rapunzel.cpp:25:1: error: stray '\305' in program rapunzel.cpp:25:1: error: stray '\243' in program rapunzel.cpp:25:1: error: stray '\304' in program rapunzel.cpp:25:1: error: stray '\203' in program rapunzel.cpp:25:1: error: stray '\303' in program rapunzel.cpp:25:1: error: stray '\242' in program rapunzel.cpp:25:1: error: stray '\304' in program rapunzel.cpp:25:1: error: stray '\203' in program rapunzel.cpp:25:1: error: stray '\305' in program rapunzel.cpp:25:1: error: stray '\243' in program rapunzel.cpp:25:1: error: stray '\303' in program rapunzel.cpp:25:1: error: stray '\256' in program rapunzel.cpp:25:1: error: stray '\304' in program rapunzel.cpp:25:1: error: stray '\203' in program rapunzel.cpp:25:1: error: stray '\304' in program rapunzel.cpp:25:1: error: stray '\203' in program rapunzel.cpp:34:1: error: stray '\310' in program Explicație ^ rapunzel.cpp:34:1: error: stray '\233' in program rapunzel.cpp:35:1: error: stray '\303' in program Turnul are înălţimea de 10 metri. Flynn urcă până la asfinţit 1 metru iar până la miezul nopţii încă 4 metri. După 3 zile el va ajunge la Rapunzel. ^ rapunzel.cpp:35:1: error: stray '\256' in program rapunzel.cpp:35:1: error: stray '\304' in program rapunzel.cpp:35:1: error: stray '\203' in program rapunzel.cpp:35:1: error: stray '\305' in program rapunzel.cpp:35:1: error: stray '\243' in program rapunzel.cpp:35:1: error: stray '\304' in program rapunzel.cpp:35:1: error: stray '\203' in program rapunzel.cpp:35:1: error: stray '\303' in program rapunzel.cpp:35:1: error: stray '\242' in program rapunzel.cpp:35:1: error: stray '\304' in program rapunzel.cpp:35:1: error: stray '\203' in program rapunzel.cpp:35:1: error: stray '\305' in program rapunzel.cpp:35:1: error: stray '\243' in program rapunzel.cpp:35:1: error: stray '\303' in program rapunzel.cpp:35:1: error: stray '\242' in program rapunzel.cpp:35:1: error: stray '\304' in program rapunzel.cpp:35:1: error: stray '\203' in program rapunzel.cpp:35:1: error: stray '\305' in program rapunzel.cpp:35:1: error: stray '\243' in program rapunzel.cpp:35:1: error: stray '\303' in program rapunzel.cpp:35:1: error: stray '\256' in program rapunzel.cpp:35:1: error: stray '\304' in program rapunzel.cpp:35:1: error: stray '\203' in program rapunzel.cpp:35:1: error: stray '\304' in program rapunzel.cpp:35:1: error: stray '\203' in program rapunzel.cpp:1:1: error: 'Rapunzel' does not name a type Rapunzel s-a născut într-un ţinut îndepărtat într-un regat necunoscut. Mama vitregă a închis-o pe Rapunzel într-un turn foarte înalt ce avea N metri. Aici Rapunzel urma să-şi petreacă toată copilăria. ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Rapunzel 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ă.