#2096
Un număr natural se numeşte “număr xyz
” dacă are x
cifre, prima cifră a sa este egală cu y
şi următoarele cifre sunt egale cu z
.
Scrieţi un program care să determine “numărul xyz
” pentru x y z
numere naturale date.
Olimpiada Municipala Informatica Iasi 2013
Problema | XYZ | Operații I/O |
![]() xyz.in /xyz.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 2 MB
/
Stivă 1 MB
|
Id soluție | #54259696 | Utilizator | |
Fișier | xyz.cpp | Dimensiune | 267 B |
Data încărcării | 23 Noiembrie 2024, 19:14 | Scor / rezultat | Eroare de compilare |
xyz.cpp:2:1: error: 'ifstream' does not name a type ifstream fin ("date.in"); ^ xyz.cpp:3:1: error: 'ofstream' does not name a type ofstream fout ("date.out"); ^ xyz.cpp: In function 'int main()': xyz.cpp:9:5: error: 'fin' was not declared in this scope fin >> x >> y >> z; ^ xyz.cpp:11:7: warning: left operand of comma operator has no effect [-Wunused-value] 1 >= x, y <= 9; ^ xyz.cpp:11:15: warning: right operand of comma operator has no effect [-Wunused-value] 1 >= x, y <= 9; ^ xyz.cpp:12:7: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] 0 <= z <= 9; ^ xyz.cpp:12:16: warning: statement has no effect [-Wunused-value] 0 <= z <= 9; ^ xyz.cpp:15:5: error: 'fout' was not declared in this scope fout << xyz << endl; ^ xyz.cpp:15:20: error: 'endl' was not declared in this scope fout << xyz << endl; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema XYZ 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ă.