#3144
Alexandru a învățat azi despre numerele romane și cum se scriu acestea. Fiind distras de ce spuneau colegii a ajuns acasă și a realizat că nu știe cum să transforme un număr din cifre arabe în cifre romane. Deoarece a doua zi are un test numai din acest capitol, vă roagă să îl ajutați la transformarea unui număr N
dat, scris cu cifre arabe în cifre romane.
Problema | Cifre_romane | Operații I/O |
![]() cifre_romane.in /cifre_romane.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #55635783 | Utilizator | |
Fișier | cifre_romane.cpp | Dimensiune | 1.02 KB |
Data încărcării | 21 Ianuarie 2025, 09:31 | Scor / rezultat | 100 puncte |
cifre_romane.cpp: In function 'void arabic_to_roman(int, char*)': cifre_romane.cpp:6:93: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] char *symbols[] = {"M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"}; ^ cifre_romane.cpp:6:93: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] cifre_romane.cpp:6:93: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] cifre_romane.cpp:6:93: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] cifre_romane.cpp:6:93: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] cifre_romane.cpp:6:93: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] cifre_romane.cpp:6:93: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] cifre_romane.cpp:6:93: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] cifre_romane.cpp:6:93: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] cifre_romane.cpp:6:93: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] cifre_romane.cpp:6:93: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] cifre_romane.cpp:6:93: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] cifre_romane.cpp:6:93: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] cifre_romane.cpp: In function 'int main()': cifre_romane.cpp:30:26: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] fscanf(fin, "%d", &n); ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 10 | 10 | Exemplu | |
2 | 0 secunde | OK. | 20 | 20 | ||
3 | 0 secunde | OK. | 20 | 20 | ||
4 | 0 secunde | OK. | 20 | 20 | ||
5 | 0 secunde | OK. | 10 | 10 | ||
6 | 0 secunde | OK. | 10 | 10 | ||
7 | 0 secunde | OK. | 5 | 5 | ||
8 | 0 secunde | OK. | 5 | 5 | ||
Punctaj total | 100 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Cifre_romane 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ă.