#2102
Paul dorește să învețe cum să programeze un robot. Pentru început s-a gândit să construiască un robot format dintr-un mâner, 10 butoane aranjate circular şi un ecran. Pe butoane sunt scrise, în ordine crescătoare, cifrele de la 0 la 9, ca în figură.
OJI 2017, Clasa a V-a
| Problema | Robot3 | Operații I/O |
robot3.in/robot3.out
|
|---|---|---|---|
| Limita timp | 0.2 secunde | Limita memorie |
Total: 2 MB
/
Stivă 1 MB
|
| Id soluție | #64306998 | Utilizator | |
| Fișier | robot3.cpp | Dimensiune | 1.41 KB |
| Data încărcării | 28 Aprilie 2026, 21:41 | Scor/rezultat | Eroare de compilare |
robot3.cpp: In function ‘int main()’: robot3.cpp:5:5: error: ‘fin’ was not declared in this scope 5 | fin >> c; | ^~~ robot3.cpp:7:9: error: ‘string’ was not declared in this scope 7 | string program; | ^~~~~~ robot3.cpp:8:16: error: ‘program’ was not declared in this scope 8 | fin >> program; | ^~~~~~~ robot3.cpp:11:9: error: ‘fout’ was not declared in this scope 11 | fout << nrA; | ^~~~ robot3.cpp:14:9: error: ‘string’ was not declared in this scope 14 | string program; | ^~~~~~ robot3.cpp:15:16: error: ‘program’ was not declared in this scope 15 | fin >> program; | ^~~~~~~ robot3.cpp:25:17: error: ‘fout’ was not declared in this scope 25 | fout << cifra; | ^~~~ robot3.cpp:32:9: error: ‘string’ was not declared in this scope 32 | string rezultat; | ^~~~~~ robot3.cpp:33:16: error: ‘rezultat’ was not declared in this scope 33 | fin >> rezultat; | ^~~~~~~~ robot3.cpp:40:21: error: ‘fout’ was not declared in this scope 40 | fout << "D" << d; | ^~~~ robot3.cpp:42:21: error: ‘fout’ was not declared in this scope 42 | fout << "S" << 10 - d; | ^~~~ robot3.cpp:46:13: error: ‘fout’ was not declared in this scope 46 | fout << "A"; | ^~~~ robot3.cpp:48:9: error: ‘fout’ was not declared in this scope 48 | fout << "T"; | ^~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Robot3 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ă.