#3268
CMMDC_CMMMC
Se dau două numere naturale nenule. Determinați cel mai mare divizor comun și cel mai mic multiplu comun al lor.
Problema | CMMDC_CMMMC | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54604550 | Utilizator | |
Fișier | cmmdc_cmmmc.cpp | Dimensiune | 291 B |
Data încărcării | 03 Decembrie 2024, 14:54 | Scor / rezultat | Eroare de compilare |
cmmdc_cmmmc.cpp:2:7: error: expected nested-name-specifier before 'namespacestd' using namespacestd; ^ cmmdc_cmmmc.cpp:2:7: error: 'namespacestd' has not been declared cmmdc_cmmmc.cpp: In function 'long long int cmmdc(int, int)': cmmdc_cmmmc.cpp:13:28: error: new declaration 'long long int cmmdc(int, int)' long long cmmdc(int a,int b) { ^ cmmdc_cmmmc.cpp:4:5: error: ambiguates old declaration 'int cmmdc(int, int)' int cmmdc(int a, int b) ^ cmmdc_cmmmc.cpp:14:27: error: expected ')' before ';' token return 1ll*a*b/cmmdc(a;b); ^ cmmdc_cmmmc.cpp:14:29: error: expected ';' before ')' token return 1ll*a*b/cmmdc(a;b); ^ cmmdc_cmmmc.cpp:14:30: warning: statement has no effect [-Wunused-value] return 1ll*a*b/cmmdc(a;b); ^ cmmdc_cmmmc.cpp: In function 'int main()': cmmdc_cmmmc.cpp:19:5: error: 'cin' was not declared in this scope cin>>a>>b; ^ cmmdc_cmmmc.cpp:19:5: note: suggested alternative: In file included from cmmdc_cmmmc.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ cmmdc_cmmmc.cpp:20:5: error: 'cout' was not declared in this scope cout<<cmmdc(a,b)<<" "<<cmmdc(a,b); ^ cmmdc_cmmmc.cpp:20:5: note: suggested alternative: In file included from cmmdc_cmmmc.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ cmmdc_cmmmc.cpp:20:38: error: expected '}' at end of input cout<<cmmdc(a,b)<<" "<<cmmdc(a,b); ^ cmmdc_cmmmc.cpp: In function 'long long int cmmdc(int, int)': cmmdc_cmmmc.cpp:15:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema CMMDC_CMMMC 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ă.