#3176
fibo0
Se dau perechi de numere a
și b
cu a ≤ b
. Să se calculeze pentru câte perechi \(f_{b}\) este multiplu de \(f_{a}\) .
Problema | fibo0 | Operații I/O |
fibo0.in /fibo0.out
|
---|---|---|---|
Limita timp | 0.3 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0.1 MB
|
Id soluție | #54592761 | Utilizator | |
Fișier | fibo0.cpp | Dimensiune | 442 B |
Data încărcării | 03 Decembrie 2024, 10:54 | Scor / rezultat | Eroare de compilare |
fibo0.cpp:3:13: error: variable 'std::ifstream fin' has initializer but incomplete type ifstream fin("fibo0.in") ^ fibo0.cpp:4:1: error: expected ',' or ';' before 'ofstream' ofstream fout("fibo0.out") ^ fibo0.cpp: In function 'int main()': fibo0.cpp:8:5: error: 'n' was not declared in this scope n = 0; ^ fibo0.cpp:9:19: error: 'A' was not declared in this scope while (fin >> A >> B){ ^ fibo0.cpp:9:24: error: 'B' was not declared in this scope while (fin >> A >> B){ ^ fibo0.cpp:10:7: error: 'a' was not declared in this scope a = b = 1; ^ fibo0.cpp:10:11: error: 'b' was not declared in this scope a = b = 1; ^ fibo0.cpp:11:7: error: 'fa' was not declared in this scope fa = fb = 1; ^ fibo0.cpp:11:12: error: 'fb' was not declared in this scope fa = fb = 1; ^ fibo0.cpp:13:5: error: 'c' was not declared in this scope c = a + b; ^ fibo0.cpp:16:17: error: expected primary-expression before '}' token if (A == 1) } ^ fibo0.cpp:16:17: error: expected ';' before '}' token fibo0.cpp:17:9: error: 'fa' was not declared in this scope fa = b; ^ fibo0.cpp:17:14: error: 'b' was not declared in this scope fa = b; ^ fibo0.cpp: At global scope: fibo0.cpp:19:3: error: 'fb' does not name a type fb = b; ^ fibo0.cpp:20:3: error: expected unqualified-id before 'if' if ( fb % fa == 0); ^ fibo0.cpp:21:3: error: 'perechi' does not name a type perechi++; ^ fibo0.cpp:22:3: error: expected declaration before '}' token } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema fibo0 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ă.