#2392
SumaXL
Se dau două numere, unul mare și unul mic, ambele pozitive. Calculați suma lor.
Problema | SumaXL | Operații I/O |
sumaxl.in /sumaxl.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #15069062 | Utilizator | |
Fișier | sumaxl.cpp | Dimensiune | 503 B |
Data încărcării | 30 Martie 2019, 17:06 | Scor / rezultat | Eroare de compilare |
sumaxl.cpp:6:30: warning: missing terminating ' character [enabled by default] ofstream f2("sumax1.out")' ^ sumaxl.cpp:6:5: error: missing terminating ' character ofstream f2("sumax1.out")' ^ sumaxl.cpp: In function 'int main()': sumaxl.cpp:7:5: error: expected ',' or ';' before 'int' int n, i, a[101], m, d, nr=0, aux=0, p=1; ^ sumaxl.cpp:8:9: error: 'n' was not declared in this scope f1>>n; ^ sumaxl.cpp:9:9: error: 'i' was not declared in this scope for(i=0; i<n; i++) ^ sumaxl.cpp:10:12: error: 'a' was not declared in this scope f1>>a[i]; ^ sumaxl.cpp:11:9: error: 'm' was not declared in this scope f1>>m; ^ sumaxl.cpp:12:5: error: 'd' was not declared in this scope d=m; ^ sumaxl.cpp:15:9: error: 'nr' was not declared in this scope nr++; ^ sumaxl.cpp:17:9: error: 'i' was not declared in this scope for(i=n-nr-2; i<n; i++){ ^ sumaxl.cpp:17:13: error: 'nr' was not declared in this scope for(i=n-nr-2; i<n; i++){ ^ sumaxl.cpp:18:9: error: 'aux' was not declared in this scope aux=aux*10+a[i]; ^ sumaxl.cpp:18:20: error: 'a' was not declared in this scope aux=aux*10+a[i]; ^ sumaxl.cpp:21:7: error: 'aux' was not declared in this scope d=aux+m; ^ sumaxl.cpp:22:9: error: 'nr' was not declared in this scope n=n-nr-2; ^ sumaxl.cpp:23:9: error: 'i' was not declared in this scope for(i=0; i<n; i++) ^ sumaxl.cpp:24:13: error: 'a' was not declared in this scope f2<<a[i]; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SumaXL 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ă.