#4553
Alipite
C++
Un număr se numește “alipit” dacă se obține prin lipirea a două sau mai multe numere identice. Exemplu: 121212
sau 111
.
Se dau n
numere naturale cu cel mult 12 cifre fiecare. Calculați suma celor care sunt alipite.
Problema | Alipite | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 2 MB
/
Stivă 1 MB
|
Id soluție | #51335037 | Utilizator | |
Fișier | alipite.cpp | Dimensiune | 547 B |
Data încărcării | 08 Iunie 2024, 10:26 | Scor / rezultat | Eroare de compilare |
alipite.cpp:11:1: error: stray '\302' in program cin » x; ^ alipite.cpp:11:1: error: stray '\273' in program alipite.cpp:16:1: error: stray '\357' in program cnt+t; ^ alipite.cpp:16:1: error: stray '\274' in program alipite.cpp:16:1: error: stray '\233' in program alipite.cpp:18:1: error: stray '\357' in program for(int j=cnt-1:jy=0:3-) ^ alipite.cpp:18:1: error: stray '\274' in program alipite.cpp:18:1: error: stray '\210' in program alipite.cpp:18:1: error: stray '\357' in program alipite.cpp:18:1: error: stray '\274' in program alipite.cpp:18:1: error: stray '\211' in program alipite.cpp:24:1: error: stray '\357' in program if(cnt % 5==0) ^ alipite.cpp:24:1: error: stray '\274' in program alipite.cpp:24:1: error: stray '\210' in program alipite.cpp:24:1: error: stray '\357' in program alipite.cpp:24:1: error: stray '\274' in program alipite.cpp:24:1: error: stray '\211' in program alipite.cpp:25:1: error: stray '\357' in program for(intk=j+jik<= cnts k += j) ^ alipite.cpp:25:1: error: stray '\274' in program alipite.cpp:25:1: error: stray '\210' in program alipite.cpp:25:1: error: stray '\357' in program alipite.cpp:25:1: error: stray '\274' in program alipite.cpp:25:1: error: stray '\234' in program alipite.cpp:25:1: error: stray '\357' in program alipite.cpp:25:1: error: stray '\274' in program alipite.cpp:25:1: error: stray '\211' in program alipite.cpp:26:1: error: stray '\357' in program { ^ alipite.cpp:26:1: error: stray '\275' in program alipite.cpp:26:1: error: stray '\233' in program alipite.cpp:37:1: error: stray '\342' in program cout ‹ s; ^ alipite.cpp:37:1: error: stray '\200' in program alipite.cpp:37:1: error: stray '\271' in program alipite.cpp: In function 'int main()': alipite.cpp:6:1: error: 'cin' was not declared in this scope cin >> n; ^ alipite.cpp:11:8: error: expected ';' before 'x' cin » x; ^ alipite.cpp:16:5: error: 't' was not declared in this scope cnt+t; ^ alipite.cpp:17:1: error: expected ';' before '}' token } ^ alipite.cpp:18:7: error: expected '(' before 'int' for(int j=cnt-1:jy=0:3-) ^ alipite.cpp:18:19: error: 'jy' was not declared in this scope for(int j=cnt-1:jy=0:3-) ^ alipite.cpp:18:23: error: expected ')' before ':' token for(int j=cnt-1:jy=0:3-) ^ alipite.cpp:18:23: error: expected primary-expression before ':' token alipite.cpp:18:23: error: expected ';' before ':' token alipite.cpp:18:11: warning: unused variable 'j' [-Wunused-variable] for(int j=cnt-1:jy=0:3-) ^ alipite.cpp:22:22: error: 'ent' was not declared in this scope for (int j = 1; j <= ent; j++) ^ alipite.cpp:24:6: error: expected '(' before 'cnt' if(cnt % 5==0) ^ alipite.cpp:29:1: error: 'else' without a previous 'if' else if(k == cnt) ^ alipite.cpp:29:9: error: 'k' was not declared in this scope else if(k == cnt) ^ alipite.cpp:5:24: warning: unused variable 's' [-Wunused-variable] long long int n, x, y, s = 0, cif[13], cnt; ^ alipite.cpp:5:31: warning: unused variable 'cif' [-Wunused-variable] long long int n, x, y, s = 0, cif[13], cnt; ^ alipite.cpp: At global scope: alipite.cpp:35:1: error: expected unqualified-id before 'if' if(check) s+= x; ^ alipite.cpp:36:1: error: expected declaration before '}' token } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Alipite 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ă.