#1832
pd
Se dă un număr natural s
. Determinaţi, în ordine lexicografică, toate modalităţile de a-l scrie pe s
ca produs de divizori proprii distincți ai lui s
.
Problema | pd | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.05 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #48244960 | Utilizator | |
Fișier | pd.cpp | Dimensiune | 892 B |
Data încărcării | 19 Ianuarie 2024, 13:44 | Scor / rezultat | Eroare de compilare |
pd.cpp:8:34: error: 'int div [110]' redeclared as different kind of symbol int s[100], n, gasit = 0, div[110], contor = 0; ^ 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 pd.cpp:6: /usr/include/stdlib.h:789:14: error: previous declaration of 'div_t div(int, int)' extern div_t div (int __numer, int __denom) ^ pd.cpp: In function 'void divide()': pd.cpp:21:25: warning: pointer to a function used in arithmetic [-Wpointer-arith] div[contor++] = i; ^ pd.cpp:21:27: error: assignment of read-only location '*(div + ((sizetype)(contor ++)))' div[contor++] = i; ^ pd.cpp:21:27: error: cannot convert 'int' to 'div_t(int, int)throw ()' in assignment pd.cpp: In function 'int back(int, int)': pd.cpp:28:21: warning: pointer to a function used in arithmetic [-Wpointer-arith] s[k] = div[i]; ^ pd.cpp:28:21: error: invalid conversion from 'div_t (*)(int, int)throw ()' to 'int' [-fpermissive] pd.cpp:29:22: warning: pointer to a function used in arithmetic [-Wpointer-arith] Prod *= div[i]; ^ pd.cpp:29:14: error: invalid operands of types 'long long int' and 'div_t(int, int)throw ()' to binary 'operator*' Prod *= div[i]; ^ pd.cpp:29:14: error: in evaluation of 'operator*=(long long int, struct div_t(int, int)throw ())' pd.cpp:40:22: warning: pointer to a function used in arithmetic [-Wpointer-arith] Prod /= div[i]; ^ pd.cpp:40:14: error: invalid operands of types 'long long int' and 'div_t(int, int)throw ()' to binary 'operator/' Prod /= div[i]; ^ pd.cpp:40:14: error: in evaluation of 'operator/=(long long int, struct div_t(int, int)throw ())' pd.cpp:42:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema pd 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ă.