#2752
Se consideră șirul de cifre zecimale obținut prin scrierea consecutivă a numerelor naturale de la 10 la 99: 101112131415...9596979899.
Pentru un k dat, să se afișeze cifra ce apare în acest șir pe poziția k.
| Problema | CifreZecimale | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #65014150 | Utilizator | |
| Fișier | cifrezecimale.cpp | Dimensiune | 325 B |
| Data încărcării | 14 Iulie 2026, 18:26 | Scor/rezultat | 80 puncte |
In file included from /usr/include/c++/13/istream:41, from /usr/include/c++/13/sstream:40, from /usr/include/c++/13/complex:45, from /usr/include/c++/13/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:127, from cifrezecimale.cpp:1: In member function ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>]’, inlined from ‘int main()’ at cifrezecimale.cpp:17:19: /usr/include/c++/13/ostream:204:25: warning: ‘c’ may be used uninitialized [-Wmaybe-uninitialized] 204 | { return _M_insert(__n); } | ~~~~~~~~~^~~~~ cifrezecimale.cpp: In function ‘int main()’: cifrezecimale.cpp:5:25: note: ‘c’ was declared here 5 | long long int n,i,k,c,c1,cn; | ^ In member function ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>]’, inlined from ‘int main()’ at cifrezecimale.cpp:16:26: /usr/include/c++/13/ostream:204:25: warning: ‘c1’ may be used uninitialized [-Wmaybe-uninitialized] 204 | { return _M_insert(__n); } | ~~~~~~~~~^~~~~ cifrezecimale.cpp: In function ‘int main()’: cifrezecimale.cpp:5:27: note: ‘c1’ was declared here 5 | long long int n,i,k,c,c1,cn; | ^~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.003 secunde | OK. | 10 | 10 | ||
| 2 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 3 | 0.001 secunde | OK. | 10 | 10 | ||
| 4 | 0.001 secunde | OK. | 10 | 10 | ||
| 5 | 0.001 secunde | OK. | 10 | 10 | ||
| 6 | 0.001 secunde | OK. | 10 | 10 | ||
| 7 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 8 | 0.001 secunde | OK. | 10 | 10 | ||
| 9 | 0.001 secunde | OK. | 10 | 10 | ||
| 10 | 0.001 secunde | OK. | 10 | 10 | ||
| Punctaj total | 80 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema CifreZecimale 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ă.