#1840
PMax
C++
Se dau n
numere naturale, fie acestea A
1
, A
2
,..., A
n
și X
i
cel mai mic număr care are aceiași factori primi in descompunere ca şi A
i
, unde 1≤i≤n
. Aflați produsul X
1
* X
2
*...* X
n
.
Problema | PMax | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #46227047 | Utilizator | |
Fișier | pmax.cpp | Dimensiune | 1.44 KB |
Data încărcării | 07 Noiembrie 2023, 19:37 | Scor / rezultat | Eroare de compilare |
pmax.cpp:45:1: error: stray '\302' in program int i; ^ pmax.cpp:45:1: error: stray '\240' in program pmax.cpp:45:1: error: stray '\302' in program pmax.cpp:45:1: error: stray '\240' in program pmax.cpp:46:1: error: stray '\302' in program for(i=lgx-1; i>=0; i--) cout<<x[i]; ^ pmax.cpp:46:1: error: stray '\240' in program pmax.cpp:46:1: error: stray '\302' in program pmax.cpp:46:1: error: stray '\240' in program pmax.cpp:47:1: error: stray '\302' in program ^ pmax.cpp:47:1: error: stray '\240' in program pmax.cpp:47:1: error: stray '\302' in program pmax.cpp:47:1: error: stray '\240' in program pmax.cpp:51:1: error: stray '\302' in program int i, t, val; ^ pmax.cpp:51:1: error: stray '\240' in program pmax.cpp:51:1: error: stray '\302' in program pmax.cpp:51:1: error: stray '\240' in program pmax.cpp:52:1: error: stray '\302' in program if (y==0 || lgx==1 && x[0]==0) {lgz=1; z[0]=0; return;} ^ pmax.cpp:52:1: error: stray '\240' in program pmax.cpp:52:1: error: stray '\302' in program pmax.cpp:52:1: error: stray '\240' in program pmax.cpp:53:1: error: stray '\302' in program for (i=t=0; i<lgx; i++) ^ pmax.cpp:53:1: error: stray '\240' in program pmax.cpp:53:1: error: stray '\302' in program pmax.cpp:53:1: error: stray '\240' in program pmax.cpp:54:1: error: stray '\302' in program { ^ pmax.cpp:54:1: error: stray '\240' in program pmax.cpp:54:1: error: stray '\302' in program pmax.cpp:54:1: error: stray '\240' in program pmax.cpp:55:1: error: stray '\302' in program val=x[i]*y+t; ^ pmax.cpp:55:1: error: stray '\240' in program pmax.cpp:55:1: error: stray '\302' in program pmax.cpp:55:1: error: stray '\240' in program pmax.cpp:55:1: error: stray '\302' in program pmax.cpp:55:1: error: stray '\240' in program pmax.cpp:55:1: error: stray '\302' in program pmax.cpp:55:1: error: stray '\240' in program pmax.cpp:56:1: error: stray '\302' in program z[i]=val%10; ^ pmax.cpp:56:1: error: stray '\240' in program pmax.cpp:56:1: error: stray '\302' in program pmax.cpp:56:1: error: stray '\240' in program pmax.cpp:56:1: error: stray '\302' in program pmax.cpp:56:1: error: stray '\240' in program pmax.cpp:56:1: error: stray '\302' in program pmax.cpp:56:1: error: stray '\240' in program pmax.cpp:57:1: error: stray '\302' in program t=val/10; ^ pmax.cpp:57:1: error: stray '\240' in program pmax.cpp:57:1: error: stray '\302' in program pmax.cpp:57:1: error: stray '\240' in program pmax.cpp:57:1: error: stray '\302' in program pmax.cpp:57:1: error: stray '\240' in program pmax.cpp:57:1: error: stray '\302' in program pmax.cpp:57:1: error: stray '\240' in program pmax.cpp:58:1: error: stray '\302' in program } ^ pmax.cpp:58:1: error: stray '\240' in program pmax.cpp:58:1: error: stray '\302' in program pmax.cpp:58:1: error: stray '\240' in program pmax.cpp:59:1: error: stray '\302' in program lgz=lgx; ^ pmax.cpp:59:1: error: stray '\240' in program pmax.cpp:59:1: error: stray '\302' in program pmax.cpp:59:1: error: stray '\240' in program pmax.cpp:60:1: error: stray '\302' in program ^ pmax.cpp:60:1: error: stray '\240' in program pmax.cpp:60:1: error: stray '\302' in program pmax.cpp:60:1: error: stray '\240' in program pmax.cpp:61:1: error: stray '\302' in program while (t){z[lgz++]=t%10; t/=10;} ^ pmax.cpp:61:1: error: stray '\240' in program pmax.cpp:61:1: error: stray '\302' in program pmax.cpp:61:1: error: stray '\240' in program pmax.cpp:6:10: error: array must be initialized with a brace-enclosed initializer NrMare P=1,x; ^ pmax.cpp: In function 'int main()': pmax.cpp:38:31: error: invalid conversion from 'int' to 'int*' [-fpermissive] prod(P,lgp,y,P,lgp); f[y]--; ^ pmax.cpp:10:6: error: initializing argument 1 of 'void prod(int*, int, int, int*, int&)' [-fpermissive] void prod(NrMare x, int lgx, int y, NrMare z, int& lgz); ^ pmax.cpp:38:31: error: invalid conversion from 'int' to 'int*' [-fpermissive] prod(P,lgp,y,P,lgp); f[y]--; ^ pmax.cpp:10:6: error: initializing argument 4 of 'void prod(int*, int, int, int*, int&)' [-fpermissive] void prod(NrMare x, int lgx, int y, NrMare z, int& lgz); ^ pmax.cpp:40:18: error: invalid conversion from 'int' to 'int*' [-fpermissive] afisare(P,lgp); ^ pmax.cpp:9:6: error: initializing argument 1 of 'void afisare(int*, int)' [-fpermissive] void afisare(NrMare x, int lgx); ^ pmax.cpp: In function 'void prod(int*, int, int, int*, int&)': pmax.cpp:52:26: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if (y==0 || lgx==1 && x[0]==0) {lgz=1; z[0]=0; return;} ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema PMax 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ă.