#2745
intrebari
Se dau n
numere naturale. Dându-se totodată un număr p
, apare o intrebare care poate fi de unul dintre următoarele două feluri posibile: care este suma cifrelor valorii minime dintre primele p
ale șirului (tipul 1
) respectiv, care este numărul de divizori ai valorii maxime dintre primele p
elemente ale șirului (tipul 2
).
Problema | intrebari | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #49539215 | Utilizator | |
Fișier | intrebari.cpp | Dimensiune | 763 B |
Data încărcării | 06 Martie 2024, 12:38 | Scor / rezultat | Eroare de compilare |
intrebari.cpp: In function 'int main()': intrebari.cpp:6:19: error: 'INT_MAX' was not declared in this scope int n,t,p,min=INT_MAX, max=INT_MIN,s=0,i,v[10]; ^ intrebari.cpp:8:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ intrebari.cpp:9:10: error: 'v' was not declared in this scope cin>>v[i]; ^ intrebari.cpp:12:17: error: 'i' was not declared in this scope for(i=1;i<=p;i++) ^ intrebari.cpp:13:24: error: 'v' was not declared in this scope if(min>v[i]) ^ intrebari.cpp:17:17: error: 's' was not declared in this scope s=s+min%10; ^ intrebari.cpp:20:19: error: 's' was not declared in this scope cout<<s<<endl; ^ intrebari.cpp:24:17: error: 'i' was not declared in this scope for(i=1;i<=p;i++) ^ intrebari.cpp:25:24: error: 'v' was not declared in this scope if(max<v[i]) ^ intrebari.cpp:25:20: error: parse error in template argument list if(max<v[i]) ^ intrebari.cpp:25:28: error: cannot resolve overloaded function 'max' based on conversion to type 'bool' if(max<v[i]) ^ intrebari.cpp:27:17: error: 'i' was not declared in this scope for(i=1;i<=max;i++) ^ intrebari.cpp:29:17: error: 's' was not declared in this scope s++; ^ intrebari.cpp:31:15: error: 's' was not declared in this scope cout<<s<<endl;} ^ intrebari.cpp:32:9: error: 's' was not declared in this scope s=0; ^ intrebari.cpp:33:13: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ intrebari.cpp:34:17: error: 'v' was not declared in this scope s=s+v[i]; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema intrebari 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ă.