#1081
Numar3
Se dă un număr raţional strict pozitiv q
, sub formă de fracţie zecimală.
Să se determine două numere naturale a
şi b
astfel \( q= \frac{a}{b} \) încât iar modulul diferenţei dintre a
şi b
să fie minim.
OJI 2010, Clasa a IX-a
Problema | Numar3 | Operații I/O |
![]() numar3.in /numar3.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 2 MB
/
Stivă 1 MB
|
Id soluție | #57043146 | Utilizator | |
Fișier | numar3.cpp | Dimensiune | 2.63 KB |
Data încărcării | 13 Martie 2025, 19:19 | Scor / rezultat | 35 puncte |
numar3.cpp: In function 'int main()': numar3.cpp:12:26: warning: unused variable 'j' [-Wunused-variable] long long ni, nz, i, j = 0, x = 0, y = 0, sz = 0, t[2001]={0}, r[2001] = {0}, m, Sn; ^ numar3.cpp:12:47: warning: unused variable 'sz' [-Wunused-variable] long long ni, nz, i, j = 0, x = 0, y = 0, sz = 0, t[2001]={0}, r[2001] = {0}, m, Sn; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 5 | 5 | ||
2 | 0 secunde | OK. | 5 | 5 | ||
3 | 0 secunde | OK. | 5 | 5 | ||
4 | 0 secunde | OK. | 5 | 5 | ||
5 | 0 secunde | OK. | 5 | 5 | ||
6 | 0 secunde | OK. | 5 | 5 | ||
7 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
8 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
9 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
10 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
11 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
12 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
13 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
14 | 0 secunde | OK. | 5 | 5 | ||
15 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
16 | 0.02 secunde | Raspuns gresit. | 5 | 0 | ||
17 | 0.032 secunde | Raspuns gresit. | 5 | 0 | ||
18 | 0.072 secunde | Raspuns gresit. | 5 | 0 | ||
19 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
20 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
Punctaj total | 35 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Numar3 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ă.