#3663
ppdp
Se dă un număr natural n
. Calculați pătratul celui mai mic divizor propriu al său.
Problema | ppdp | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #55066320 | Utilizator | |
Fișier | ppdp.cpp | Dimensiune | 237 B |
Data încărcării | 19 Decembrie 2024, 20:46 | Scor / rezultat | Eroare de compilare |
ppdp.cpp:5:14: error: 'long long int div' redeclared as different kind of symbol long long n, div; ^ In file included from /usr/include/c++/4.8/cstdlib:72:0, from /usr/include/c++/4.8/ext/string_conversions.h:41, from /usr/include/c++/4.8/bits/basic_string.h:2815, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from ppdp.cpp:1: /usr/include/stdlib.h:789:14: error: previous declaration of 'div_t div(int, int)' extern div_t div (int __numer, int __denom) ^ ppdp.cpp: In function 'int main()': ppdp.cpp:10:16: error: overloaded function with no contextual type information for(div=3;div*div<=n;div=div+2) ^ ppdp.cpp:10:23: error: invalid operands of types '<unresolved overloaded function type>' and '<unresolved overloaded function type>' to binary 'operator*' for(div=3;div*div<=n;div=div+2) ^ ppdp.cpp:10:38: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+' for(div=3;div*div<=n;div=div+2) ^ ppdp.cpp:11:18: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary 'operator%' if(n%div==0) ^ ppdp.cpp:12:28: error: invalid operands of types '<unresolved overloaded function type>' and '<unresolved overloaded function type>' to binary 'operator*' {cout<<div*div; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ppdp 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ă.