#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 | #54043687 | Utilizator | |
Fișier | alipite.cpp | Dimensiune | 1.33 KB |
Data încărcării | 18 Noiembrie 2024, 16:39 | Scor / rezultat | 90 puncte |
alipite.cpp: In function 'int lafel(long long unsigned int)': alipite.cpp:17:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (n%10!=u) ^ alipite.cpp: In function 'int main()': alipite.cpp:45:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i=1;i<=n;i++) ^ alipite.cpp:59:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (sumcif(x)/3==x%100 && sumcif(x)/3==(x/100)%100 && sumcif(x)/3==(x/10000)) ^ alipite.cpp:59:60: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (sumcif(x)/3==x%100 && sumcif(x)/3==(x/100)%100 && sumcif(x)/3==(x/10000)) ^ alipite.cpp:59:88: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (sumcif(x)/3==x%100 && sumcif(x)/3==(x/100)%100 && sumcif(x)/3==(x/10000)) ^ alipite.cpp:64:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (sumcif(x)/5==x%100 && sumcif(x)/5==(x/100)%100 && sumcif(x)/5==(x/10000)%100 && sumcif(x)/5==(x/1000000)%100 && sumcif(x)/5==(x/100000000)) ^ alipite.cpp:64:60: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (sumcif(x)/5==x%100 && sumcif(x)/5==(x/100)%100 && sumcif(x)/5==(x/10000)%100 && sumcif(x)/5==(x/1000000)%100 && sumcif(x)/5==(x/100000000)) ^ alipite.cpp:64:90: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (sumcif(x)/5==x%100 && sumcif(x)/5==(x/100)%100 && sumcif(x)/5==(x/10000)%100 && sumcif(x)/5==(x/1000000)%100 && sumcif(x)/5==(x/100000000)) ^ alipite.cpp:64:122: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (sumcif(x)/5==x%100 && sumcif(x)/5==(x/100)%100 && sumcif(x)/5==(x/10000)%100 && sumcif(x)/5==(x/1000000)%100 && sumcif(x)/5==(x/100000000)) ^ alipite.cpp:64:154: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (sumcif(x)/5==x%100 && sumcif(x)/5==(x/100)%100 && sumcif(x)/5==(x/10000)%100 && sumcif(x)/5==(x/1000000)%100 && sumcif(x)/5==(x/100000000)) ^ alipite.cpp:43:40: warning: unused variable 'y' [-Wunused-variable] unsigned long long int n,s=0,l,k,x,y; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 10 | 10 | ||
2 | 0 secunde | OK. | 10 | 10 | ||
3 | 0 secunde | OK. | 10 | 10 | ||
4 | 0 secunde | OK. | 10 | 10 | ||
5 | 0 secunde | OK. | 10 | 10 | ||
6 | 0 secunde | OK. | 10 | 10 | ||
7 | 0 secunde | OK. | 10 | 10 | ||
8 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
9 | 0 secunde | OK. | 10 | 10 | ||
10 | 0 secunde | OK. | 10 | 10 | ||
Punctaj total | 90 |
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ă.