#2608
biprime
Se dă n
un număr natural care este produsul a două numere prime distincte, şi m
reprezentând numărul numerelor mai mici sau egale cu n
, prime cu n
. Aflaţi cele două numere prime din descompunerea lui n
.
Problema | biprime | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54846823 | Utilizator | |
Fișier | biprime.cpp | Dimensiune | 474 B |
Data încărcării | 10 Decembrie 2024, 10:54 | Scor / rezultat | Eroare de compilare |
biprime.cpp: In function 'int main()': biprime.cpp:9:5: error: expected ';' before 'ofstream' ofstream("cout") ^ biprime.cpp:11:10: error: 'n' was not declared in this scope cin>>n>>c; ^ biprime.cpp:11:13: error: 'c' was not declared in this scope cin>>n>>c; ^ biprime.cpp:14:14: error: 'a' was not declared in this scope cin>>a; ^ biprime.cpp:15:9: error: 'ca' was not declared in this scope ca=a; ^ biprime.cpp:16:22: error: 'd' was not declared in this scope while(a>1 && d*d<=0) ^ biprime.cpp:17:10: error: 'exp' was not declared in this scope {exp++;a=a/d;} ^ biprime.cpp:18:9: error: 'nrdiv' was not declared in this scope nrdiv=nrdiv*(exp+1); ^ biprime.cpp:18:22: error: 'exp' was not declared in this scope nrdiv=nrdiv*(exp+1); ^ biprime.cpp:20:9: error: 'd' was not declared in this scope d++; ^ biprime.cpp:24:5: error: 'a' was not declared in this scope if(a>1) nrdiv*=2; ^ biprime.cpp:24:10: error: 'nrdiv' was not declared in this scope if(a>1) nrdiv*=2; ^ biprime.cpp:25:5: error: 'nrdiv' was not declared in this scope if(nrdiv>=c) ^ biprime.cpp:26:7: error: 'ca' was not declared in this scope cout<ca<<" "; ^ biprime.cpp:27:2: error: 'nrdiv' was not declared in this scope nrdiv=1; ^ biprime.cpp:28:2: error: 'exp' was not declared in this scope exp=0; ^ biprime.cpp:29:2: error: 'd' was not declared in this scope d=2; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema biprime 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ă.