#2619
five
Se consideră un șir de numere naturale a[1]
, a[2]
, …, a[n]
. Să se determine numărul tripletelor (a[i], a[j], a[p])
cu i < j < p
, iar a[i] + a[j] + a[p]
este divizibil cu 5
.
Folclorul informatic
Problema | five | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50585283 | Utilizator | |
Fișier | five.cpp | Dimensiune | 811 B |
Data încărcării | 16 Aprilie 2024, 09:22 | Scor / rezultat | Eroare de compilare |
five.cpp:18:2: error: invalid preprocessing directive #defile #defile ULL unsigned long long ^ five.cpp:21:1: error: 'ULL' does not name a type ULL v[6],n,w,x,y,z,rez,a,b; ^ five.cpp: In function 'int main()': five.cpp:25:10: error: 'n' was not declared in this scope cin>>n>>w>>x>>y>>z; ^ five.cpp:25:13: error: 'w' was not declared in this scope cin>>n>>w>>x>>y>>z; ^ five.cpp:25:16: error: 'x' was not declared in this scope cin>>n>>w>>x>>y>>z; ^ five.cpp:25:19: error: 'y' was not declared in this scope cin>>n>>w>>x>>y>>z; ^ five.cpp:25:22: error: 'z' was not declared in this scope cin>>n>>w>>x>>y>>z; ^ five.cpp:26:5: error: 'a' was not declared in this scope a=w; ^ five.cpp:27:5: error: 'v' was not declared in this scope v[w%5]++; ^ five.cpp:28:9: error: 'i' was not declared in this scope for(i=2;i<=n;i++) ^ five.cpp:30:9: error: 'b' was not declared in this scope b=(x*a+y)%z; ^ five.cpp:34:5: error: 'rez' was not declared in this scope rez+=v[0]*v[1]*v[4]; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema five 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ă.