#3486
Numim factorul-x a 2
numere produsul tuturor factorilor primi comuni și diferiți ai celor 2
numere.
Se dau n
numere naturale distincte. Se cere să se afle câți factori-x diferiți pot fi obținuți din toate perechile diferite de numere din șir și să se afișeze aceștia.
Problema | FactorulX | Operații I/O |
![]() factorulx.in /factorulx.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 4 MB
/
Stivă 1 MB
|
Id soluție | #57811076 | Utilizator | |
Fișier | factorulx.cpp | Dimensiune | 984 B |
Data încărcării | 19 Aprilie 2025, 12:00 | Scor / rezultat | Eroare de compilare |
factorulx.cpp:1:10: error: #include expects "FILENAME" or <FILENAME> #include bits/stdc++.h ^ factorulx.cpp:4:1: error: 'ifstream' does not name a type ifstream fin("factorulx.in"); ^ factorulx.cpp:5:1: error: 'ofstream' does not name a type ofstream fout("factorulx.out"); ^ factorulx.cpp: In function 'int main()': factorulx.cpp:23:5: error: 'fin' was not declared in this scope fin>>n; ^ factorulx.cpp:24:5: error: 'vector' was not declared in this scope vector <ull> v(n); ^ factorulx.cpp:2:13: error: expected primary-expression before 'unsigned' #define ull unsigned long long ^ factorulx.cpp:24:13: note: in expansion of macro 'ull' vector <ull> v(n); ^ factorulx.cpp:2:13: error: expected ';' before 'unsigned' #define ull unsigned long long ^ factorulx.cpp:24:13: note: in expansion of macro 'ull' vector <ull> v(n); ^ factorulx.cpp:2:13: error: expected primary-expression before 'unsigned' #define ull unsigned long long ^ factorulx.cpp:25:13: note: in expansion of macro 'ull' vector <ull> factor; ^ factorulx.cpp:2:13: error: expected ';' before 'unsigned' #define ull unsigned long long ^ factorulx.cpp:25:13: note: in expansion of macro 'ull' vector <ull> factor; ^ factorulx.cpp:27:14: error: 'v' was not declared in this scope fin>>v[i]; ^ factorulx.cpp:31:24: error: 'v' was not declared in this scope ull fx=factorx(v[i], v[j]); ^ factorulx.cpp:32:19: error: 'factor' was not declared in this scope if (count(factor.begin(), factor.end(), fx)==0) ^ factorulx.cpp:32:51: error: 'count' was not declared in this scope if (count(factor.begin(), factor.end(), fx)==0) ^ factorulx.cpp:35:22: error: 'factor' was not declared in this scope for (short i=0;i<factor.size()-1;++i) ^ factorulx.cpp:37:59: error: 'swap' was not declared in this scope if (factor[i]>factor[j]) swap(factor[i], factor[j]); ^ factorulx.cpp:38:18: error: 'factor' was not declared in this scope for (ull i : factor) ^ factorulx.cpp:39:9: error: 'fout' was not declared in this scope fout<<i<<" "; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema FactorulX 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ă.