#3792
Fie a și b două numere naturale 0 < a ≤ b. Să se determine numărul de fracții \( \frac{x}{y} \) diferite, ce se pot forma utilizând numere naturale nenule, având proprietățile: \( \frac{a}{b} \leq \frac{x}{y} \leq \frac{b}{a} \) și 2 ≤ x + y ≤ a + b.
Concursul Național Info Pro, Etapa II
| Problema | nfrac | Operații I/O |
nfrac.in/nfrac.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #63977337 | Utilizator | |
| Fișier | nfrac.cpp | Dimensiune | 1.68 KB |
| Data încărcării | 01 Aprilie 2026, 10:09 | Scor/rezultat | 0 puncte |
nfrac.cpp: In function 'int main()': nfrac.cpp:31:36: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen("nfrac.in", "r", stdin); ^ nfrac.cpp:32:38: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen("nfrac.out", "w", stdout); ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 0 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 1 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 2 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 3 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 4 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 5 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 6 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 7 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 8 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 9 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 10 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 11 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 12 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 13 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 14 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 15 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 16 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 17 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 18 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 19 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 20 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 21 | 0.012 secunde | Raspuns gresit. | 4 | 0 | ||
| 22 | 0.012 secunde | Raspuns gresit. | 4 | 0 | ||
| 23 | 0.008 secunde | Raspuns gresit. | 4 | 0 | ||
| 24 | 0.012 secunde | Raspuns gresit. | 4 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema nfrac 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ă.