#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 | #57029484 | Utilizator | |
Fișier | numar3.cpp | Dimensiune | 223 B |
Data încărcării | 13 Martie 2025, 13:33 | Scor / rezultat | 0 puncte |
numar3.cpp: In function 'int main()': numar3.cpp:8:9: warning: unused variable 'q' [-Wunused-variable] int q,a,b,ni,n1,nz,s=1,i,j,k; ^ numar3.cpp:8:11: warning: unused variable 'a' [-Wunused-variable] int q,a,b,ni,n1,nz,s=1,i,j,k; ^ numar3.cpp:8:13: warning: unused variable 'b' [-Wunused-variable] int q,a,b,ni,n1,nz,s=1,i,j,k; ^ numar3.cpp:8:18: warning: unused variable 'n1' [-Wunused-variable] int q,a,b,ni,n1,nz,s=1,i,j,k; ^ numar3.cpp:8:24: warning: unused variable 's' [-Wunused-variable] int q,a,b,ni,n1,nz,s=1,i,j,k; ^ numar3.cpp:8:28: warning: unused variable 'i' [-Wunused-variable] int q,a,b,ni,n1,nz,s=1,i,j,k; ^ numar3.cpp:8:30: warning: unused variable 'j' [-Wunused-variable] int q,a,b,ni,n1,nz,s=1,i,j,k; ^ numar3.cpp:8:32: warning: unused variable 'k' [-Wunused-variable] int q,a,b,ni,n1,nz,s=1,i,j,k; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
2 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
3 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
4 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
5 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
6 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
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 | Raspuns gresit. | 5 | 0 | ||
15 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
16 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
17 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
18 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
19 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
20 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
Punctaj total | 0 |
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ă.