#985
Se dau n numere naturale și se cer: aflarea celui mai mare număr din șir cu suma cifrelor minimă, aflarea numărului minim cu număr maxim de cifre consecutive în scrierea sa și aflarea cifrei comune cât mai multor numere din șir.
| Problema | cifre11 | Operații I/O |
cifre11.in/cifre11.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 4 MB
/
Stivă 1 MB
|
| Id soluție | #64545662 | Utilizator | |
| Fișier | cifre11.cpp | Dimensiune | 542 B |
| Data încărcării | 13 Mai 2026, 14:05 | Scor/rezultat | Eroare de compilare |
cifre11.cpp: In function ‘int main()’: cifre11.cpp:9:19: warning: unused variable ‘m’ [-Wunused-variable] 9 | long long n, m, nr=0, p, x, y, s=0, maxi=0, c, mini=2000000000; | ^ cifre11.cpp:9:22: warning: unused variable ‘nr’ [-Wunused-variable] 9 | long long n, m, nr=0, p, x, y, s=0, maxi=0, c, mini=2000000000; | ^~ cifre11.cpp:9:28: warning: unused variable ‘p’ [-Wunused-variable] 9 | long long n, m, nr=0, p, x, y, s=0, maxi=0, c, mini=2000000000; | ^ cifre11.cpp:9:31: warning: unused variable ‘x’ [-Wunused-variable] 9 | long long n, m, nr=0, p, x, y, s=0, maxi=0, c, mini=2000000000; | ^ cifre11.cpp:9:34: warning: unused variable ‘y’ [-Wunused-variable] 9 | long long n, m, nr=0, p, x, y, s=0, maxi=0, c, mini=2000000000; | ^ /usr/lib/gcc/x86_64-linux-gnu/13/libstdc++.a(ios_init.o): in function \`std::ios_base::Init::Init()': (.text._ZNSt8ios_base4InitC2Ev+0x1f): failed to convert GOTPCREL relocation against '_ZNSt8ios_base4Init11_S_refcountE'; relink with --no-relax (.text._ZNSt8ios_base4InitC2Ev+0x5f): relocation truncated to fit: R_X86_64_PC32 against symbol \`__gnu_internal::buf_cout_sync' defined in .bss._ZN14__gnu_internal13buf_cout_syncE section in /usr/lib/gcc/x86_64-linux-gnu/13/libstdc++.a(globals_io.o) (.text._ZNSt8ios_base4InitC2Ev+0x66): relocation truncated to fit: R_X86_64_PC32 against symbol \`__gnu_internal::buf_cout_sync' defined in .bss._ZN14__gnu_internal13buf_cout_syncE section in /usr/lib/gcc/x86_64-linux-gnu/13/libstdc++.a(globals_io.o) (.text._ZNSt8ios_base4InitC2Ev+0x71): relocation truncated to fit: R_X86_64_PC32 against symbol \`__gnu_internal::buf_cout_sync' defined in .bss._ZN14__gnu_internal13buf_cout_syncE section in /usr/lib/gcc/x86_64-linux-gnu/13/libstdc++.a(globals_io.o) (.text._ZNSt8ios_base4InitC2Ev+0x7c): relocation truncated to fit: R_X86_64_PC32 against symbol \`__gnu_internal::buf_cout_sync' defined in .bss._ZN14__gnu_internal13buf_cout_syncE section in /usr/lib/gcc/x86_64-linux-gnu/13/libstdc++.a(globals_io.o) (.text._ZNSt8ios_base4InitC2Ev+0xa0): relocation truncated to fit: R_X86_64_PC32 against symbol \`__gnu_internal::buf_cout_sync' defined in .bss._ZN14__gnu_internal13buf_cout_syncE section in /usr/lib/gcc/x86_64-linux-gnu/13/libstdc++.a(globals_io.o) (.text._ZNSt8ios_base4InitC2Ev+0xab): relocation truncated to fit: R_X86_64_PC32 against symbol \`__gnu_internal::buf_cout_sync' defined in .bss._ZN14__gnu_internal13buf_cout_syncE section in /usr/lib/gcc/x86_64-linux-gnu/13/libstdc++.a(globals_io.o) (.text._ZNSt8ios_base4InitC2Ev+0xc8): relocation truncated to fit: R_X86_64_PC32 against symbol \`__gnu_internal::buf_cout_sync' defined in .bss._ZN14__gnu_internal13buf_cout_syncE section in /usr/lib/gcc/x86_64-linux-gnu/13/libstdc++.a(globals_io.o) (.text._ZNSt8ios_base4InitC2Ev+0xe1): relocation truncated to fit: R_X86_64_PC32 against symbol \`__gnu_internal::buf_cout_sync' defined in .bss._ZN14__gnu_internal13buf_cout_syncE section in /usr/lib/gcc/x86_64-linux-gnu/13/libstdc++.a(globals_io.o) (.text._ZNSt8ios_base4InitC2Ev+0xf4): relocation truncated to fit: R_X86_64_PC32 against symbol \`__gnu_internal::buf_cin_sync' defined in .bss._ZN14__gnu_internal12buf_cin_syncE section in /usr/lib/gcc/x86_64-linux-gnu/13/libstdc++.a(globals_io.o) (.text._ZNSt8ios_base4InitC2Ev+0xfb): relocation truncated to fit: R_X86_64_PC32 against symbol \`__gnu_internal::buf_cout_sync' defined in .bss._ZN14__gnu_internal13buf_cout_syncE section in /usr/lib/gcc/x86_64-linux-gnu/13/libstdc++.a(globals_io.o) (.text._ZNSt8ios_base4InitC2Ev+0x101): additional relocation overflows omitted from the output (.text._ZNSt8ios_base4InitC2Ev+0x1ed): failed to convert GOTPCREL relocation against '_ZSt4cout'; relink with --no-relax (.text._ZNSt8ios_base4InitC2Ev+0x252): failed to convert GOTPCREL relocation against '_ZSt3cin'; relink with --no-relax (.text._ZNSt8ios_base4InitC2Ev+0x2bc): failed to convert GOTPCREL relocation against '_ZSt4cerr'; relink with --no-relax (.text._ZNSt8ios_base4InitC2Ev+0x316): failed to convert GOTPCREL relocation against '_ZSt4clog'; relink with --no-relax (.text._ZNSt8ios_base4InitC2Ev+0x50f): failed to convert GOTPCREL relocation against '_ZSt5wcout'; relink with --no-relax (.text._ZNSt8ios_base4InitC2Ev+0x57d): failed to convert GOTPCREL relocation against '_ZSt4wcin'; relink with --no-relax (.text._ZNSt8ios_base4InitC2Ev+0x5f0): failed to convert GOTPCREL relocation against '_ZSt5wcerr'; relink with --no-relax (.text._ZNSt8ios_base4InitC2Ev+0x654): failed to convert GOTPCREL relocation against '_ZSt5wclog'; relink with --no-relax /usr/bin/ld: final link failed collect2: error: ld returned 1 exit status
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema cifre11 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ă.