#560
Flori
Copiii din clasa a V-a au hotărât să planteze flori, micșunele și panseluțe, în grădina din curtea școlii. Ei au plantat un număr de n
flori astfel: un rând de micșunele, 2
rânduri de panseluțe, 3
rânduri de micșunele, 4
rânduri de panseluțe, și așa mai departe până au terminat toate florile. Fiecare rând conține un număr de 5
flori, ultimul rând putând să conțină mai puține flori. Copiii doresc să cunoască numărul de rânduri plantate, dacă ultimul rând a fost complet sau nu și ce flori s-au plantat pe ultimul rând.
Problema | Flori | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #23181198 | Utilizator | |
Fișier | flori.cpp | Dimensiune | 415 B |
Data încărcării | 29 Mai 2020, 01:04 | Scor / rezultat | Eroare de compilare |
flori.cpp:4:1: error: stray '\302' in program { long n,i; ^ flori.cpp:4:1: error: stray '\240' in program flori.cpp:4:1: error: stray '\302' in program flori.cpp:4:1: error: stray '\240' in program flori.cpp:4:1: error: stray '\302' in program flori.cpp:4:1: error: stray '\240' in program flori.cpp:5:2: error: stray '\302' in program cin>>n; ^ flori.cpp:5:2: error: stray '\240' in program flori.cpp:5:2: error: stray '\302' in program flori.cpp:5:2: error: stray '\240' in program flori.cpp:6:2: error: stray '\302' in program if (n%5==0) ^ flori.cpp:6:2: error: stray '\240' in program flori.cpp:7:2: error: stray '\302' in program { cout<<n/5<<"\nDA\n"; ^ flori.cpp:7:2: error: stray '\240' in program flori.cpp:7:2: error: stray '\302' in program flori.cpp:7:2: error: stray '\240' in program flori.cpp:7:2: error: stray '\302' in program flori.cpp:7:2: error: stray '\240' in program flori.cpp:7:2: error: stray '\302' in program flori.cpp:7:2: error: stray '\240' in program flori.cpp:7:2: error: stray '\302' in program flori.cpp:7:2: error: stray '\240' in program flori.cpp:8:3: error: stray '\302' in program n = n/5; } ^ flori.cpp:8:3: error: stray '\240' in program flori.cpp:8:3: error: stray '\302' in program flori.cpp:8:3: error: stray '\240' in program flori.cpp:8:3: error: stray '\302' in program flori.cpp:8:3: error: stray '\240' in program flori.cpp:8:3: error: stray '\302' in program flori.cpp:8:3: error: stray '\240' in program flori.cpp:10:2: error: stray '\302' in program else { cout<<n/5+1<<"\nNU\n"; n = n/5+1; } i=1; ^ flori.cpp:10:2: error: stray '\240' in program flori.cpp:10:2: error: stray '\302' in program flori.cpp:10:2: error: stray '\240' in program flori.cpp:10:2: error: stray '\302' in program flori.cpp:10:2: error: stray '\240' in program flori.cpp:10:2: error: stray '\302' in program flori.cpp:10:2: error: stray '\240' in program flori.cpp:10:2: error: stray '\302' in program flori.cpp:10:2: error: stray '\240' in program flori.cpp:10:2: error: stray '\302' in program flori.cpp:10:2: error: stray '\240' in program flori.cpp:10:2: error: stray '\302' in program flori.cpp:10:2: error: stray '\240' in program flori.cpp:10:2: error: stray '\302' in program flori.cpp:10:2: error: stray '\240' in program flori.cpp:10:2: error: stray '\302' in program flori.cpp:10:2: error: stray '\240' in program flori.cpp:10:2: error: stray '\302' in program flori.cpp:10:2: error: stray '\240' in program flori.cpp:10:2: error: stray '\302' in program flori.cpp:10:2: error: stray '\240' in program flori.cpp:10:2: error: stray '\302' in program flori.cpp:10:2: error: stray '\240' in program flori.cpp:10:2: error: stray '\302' in program flori.cpp:10:2: error: stray '\240' in program flori.cpp:10:2: error: stray '\302' in program flori.cpp:10:2: error: stray '\240' in program flori.cpp:10:2: error: stray '\302' in program flori.cpp:10:2: error: stray '\240' in program flori.cpp:10:2: error: stray '\302' in program flori.cpp:10:2: error: stray '\240' in program flori.cpp:11:2: error: stray '\302' in program while (n>i) ^ flori.cpp:11:2: error: stray '\240' in program flori.cpp:12:2: error: stray '\302' in program { n-=i; i++; } ^ flori.cpp:12:2: error: stray '\240' in program flori.cpp:12:2: error: stray '\302' in program flori.cpp:12:2: error: stray '\240' in program flori.cpp:12:2: error: stray '\302' in program flori.cpp:12:2: error: stray '\240' in program flori.cpp:12:2: error: stray '\302' in program flori.cpp:12:2: error: stray '\240' in program flori.cpp:12:2: error: stray '\302' in program flori.cpp:12:2: error: stray '\240' in program flori.cpp:12:2: error: stray '\302' in program flori.cpp:12:2: error: stray '\240' in program flori.cpp:12:2: error: stray '\302' in program flori.cpp:12:2: error: stray '\240' in program flori.cpp:12:2: error: stray '\302' in program flori.cpp:12:2: error: stray '\240' in program flori.cpp:12:2: error: stray '\302' in program flori.cpp:12:2: error: stray '\240' in program flori.cpp:14:6: error: stray '\302' in program cout<<"panselute"; ^ flori.cpp:14:6: error: stray '\240' in program flori.cpp:14:6: error: stray '\302' in program flori.cpp:14:6: error: stray '\240' in program flori.cpp:15:2: error: stray '\302' in program else cout<<"micsunele"; ^ flori.cpp:15:2: error: stray '\240' in program flori.cpp:15:2: error: stray '\302' in program flori.cpp:15:2: error: stray '\240' in program
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Flori 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ă.