#285
x2y2k
Se dă un număr natural, k
. Să se determine toate perechile de numere naturale nenule x
, y
(x<=y
), cu proprietatea că x
2
+y
2
=k
.
Variante Bacalaureat 2009
Problema | x2y2k | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #23181248 | Utilizator | |
Fișier | x2y2k.cpp | Dimensiune | 324 B |
Data încărcării | 29 Mai 2020, 01:12 | Scor / rezultat | Eroare de compilare |
x2y2k.cpp:1:9: error: #include expects "FILENAME" or <FILENAME> #include <bits/stdc++.h> ^ x2y2k.cpp:3:1: error: stray '\302' in program using namespace std; ^ x2y2k.cpp:3:1: error: stray '\240' in program x2y2k.cpp:3:1: error: stray '\302' in program x2y2k.cpp:3:1: error: stray '\240' in program x2y2k.cpp:5:1: error: stray '\302' in program int k; ^ x2y2k.cpp:5:1: error: stray '\240' in program x2y2k.cpp:7:1: error: stray '\302' in program int main() ^ x2y2k.cpp:7:1: error: stray '\240' in program x2y2k.cpp:10:1: error: stray '\302' in program cin >> k; ^ x2y2k.cpp:10:1: error: stray '\240' in program x2y2k.cpp:10:1: error: stray '\302' in program x2y2k.cpp:10:1: error: stray '\240' in program x2y2k.cpp:10:1: error: stray '\302' in program x2y2k.cpp:10:1: error: stray '\240' in program x2y2k.cpp:10:1: error: stray '\302' in program x2y2k.cpp:10:1: error: stray '\240' in program x2y2k.cpp:10:1: error: stray '\302' in program x2y2k.cpp:10:1: error: stray '\240' in program x2y2k.cpp:10:1: error: stray '\302' in program x2y2k.cpp:10:1: error: stray '\240' in program x2y2k.cpp:12:1: error: stray '\302' in program for(int i=1;i<=int(sqrt(k));i++) ^ x2y2k.cpp:12:1: error: stray '\240' in program x2y2k.cpp:12:1: error: stray '\302' in program x2y2k.cpp:12:1: error: stray '\240' in program x2y2k.cpp:12:1: error: stray '\302' in program x2y2k.cpp:12:1: error: stray '\240' in program x2y2k.cpp:12:1: error: stray '\302' in program x2y2k.cpp:12:1: error: stray '\240' in program x2y2k.cpp:12:1: error: stray '\302' in program x2y2k.cpp:12:1: error: stray '\240' in program x2y2k.cpp:13:1: error: stray '\302' in program if(sqrt(k-i*i)==int(sqrt(k-i*i)) and i<=sqrt(k-i*i)) ^ x2y2k.cpp:13:1: error: stray '\240' in program x2y2k.cpp:13:1: error: stray '\302' in program x2y2k.cpp:13:1: error: stray '\240' in program x2y2k.cpp:13:1: error: stray '\302' in program x2y2k.cpp:13:1: error: stray '\240' in program x2y2k.cpp:13:1: error: stray '\302' in program x2y2k.cpp:13:1: error: stray '\240' in program x2y2k.cpp:13:1: error: stray '\302' in program x2y2k.cpp:13:1: error: stray '\240' in program x2y2k.cpp:13:1: error: stray '\302' in program x2y2k.cpp:13:1: error: stray '\240' in program x2y2k.cpp:13:1: error: stray '\302' in program x2y2k.cpp:13:1: error: stray '\240' in program x2y2k.cpp:13:1: error: stray '\302' in program x2y2k.cpp:13:1: error: stray '\240' in program x2y2k.cpp:13:1: error: stray '\302' in program x2y2k.cpp:13:1: error: stray '\240' in program x2y2k.cpp:13:1: error: stray '\302' in program x2y2k.cpp:13:1: error: stray '\240' in program x2y2k.cpp:14:1: error: stray '\302' in program cout << i << ' ' << sqrt(k-i*i) << endl; ^ x2y2k.cpp:14:1: error: stray '\240' in program x2y2k.cpp:14:1: error: stray '\302' in program x2y2k.cpp:14:1: error: stray '\240' in program x2y2k.cpp:14:1: error: stray '\302' in program x2y2k.cpp:14:1: error: stray '\240' in program x2y2k.cpp:14:1: error: stray '\302' in program x2y2k.cpp:14:1: error: stray '\240' in program x2y2k.cpp:14:1: error: stray '\302' in program x2y2k.cpp:14:1: error: stray '\240' in program x2y2k.cpp:14:1: error: stray '\302' in program x2y2k.cpp:14:1: error: stray '\240' in program x2y2k.cpp:14:1: error: stray '\302' in program x2y2k.cpp:14:1: error: stray '\240' in program x2y2k.cpp:14:1: error: stray '\302' in program x2y2k.cpp:14:1: error: stray '\240' in program x2y2k.cpp:14:1: error: stray '\302' in program x2y2k.cpp:14:1: error: stray '\240' in program x2y2k.cpp:14:1: error: stray '\302' in program x2y2k.cpp:14:1: error: stray '\240' in program x2y2k.cpp:14:1: error: stray '\302' in program x2y2k.cpp:14:1: error: stray '\240' in program x2y2k.cpp:14:1: error: stray '\302' in program x2y2k.cpp:14:1: error: stray '\240' in program x2y2k.cpp:14:1: error: stray '\302' in program x2y2k.cpp:14:1: error: stray '\240' in program x2y2k.cpp:14:1: error: stray '\302' in program x2y2k.cpp:14:1: error: stray '\240' in program x2y2k.cpp:14:1: error: stray '\302' in program x2y2k.cpp:14:1: error: stray '\240' in program x2y2k.cpp:14:1: error: stray '\302' in program x2y2k.cpp:14:1: error: stray '\240' in program x2y2k.cpp:14:42: warning: multi-character character constant [-Wmultichar] cout << i << ' ' << sqrt(k-i*i) << endl; ^ x2y2k.cpp:14:1: error: stray '\302' in program cout << i << ' ' << sqrt(k-i*i) << endl; ^ x2y2k.cpp:14:1: error: stray '\240' in program x2y2k.cpp:14:1: error: stray '\302' in program x2y2k.cpp:14:1: error: stray '\240' in program x2y2k.cpp:14:1: error: stray '\302' in program x2y2k.cpp:14:1: error: stray '\240' in program x2y2k.cpp:14:1: error: stray '\302' in program x2y2k.cpp:14:1: error: stray '\240' in program x2y2k.cpp:16:1: error: stray '\302' in program return 0; ^ x2y2k.cpp:16:1: error: stray '\240' in program x2y2k.cpp:16:1: error: stray '\302' in program x2y2k.cpp:16:1: error: stray '\240' in program x2y2k.cpp:16:1: error: stray '\302' in program x2y2k.cpp:16:1: error: stray '\240' in program x2y2k.cpp:16:1: error: stray '\302' in program x2y2k.cpp:16:1: error: stray '\240' in program x2y2k.cpp:16:1: error: stray '\302' in program x2y2k.cpp:16:1: error: stray '\240' in program x2y2k.cpp: In function 'int main()': x2y2k.cpp:10:9: error: 'cin' was not declared in this scope cin >> k; ^ x2y2k.cpp:12:35: error: 'sqrt' was not declared in this scope for(int i=1;i<=int(sqrt(k));i++) ^ x2y2k.cpp:14:25: error: 'cout' was not declared in this scope cout << i << ' ' << sqrt(k-i*i) << endl; ^ x2y2k.cpp:14:69: error: 'endl' was not declared in this scope cout << i << ' ' << sqrt(k-i*i) << endl; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema x2y2k 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ă.