#1925
Numar9
Se dau două numere naturale S
şi K
. Să se afle cel mai mic număr natural A
care are suma cifrelor egală cu S
, precum şi restul împărţirii lui A
la K
.
Olimpiada de Informatică , etapa pe şcoală , C.N. Tudor Vladimirescu , Târgu Jiu , 2017
Problema | Numar9 | Operații I/O |
numar9.in /numar9.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 16 MB
/
Stivă 8 MB
|
Id soluție | #50282099 | Utilizator | |
Fișier | numar9.cpp | Dimensiune | 670 B |
Data încărcării | 03 Aprilie 2024, 11:29 | Scor / rezultat | Eroare de compilare |
In file included from /usr/include/c++/4.8/iosfwd:38:0, from /usr/include/c++/4.8/ios:38, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from numar9.cpp:4: /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h: In function 'int main()': /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:184:1: error: 'namespace' definition is not allowed here namespace std ^ /usr/include/c++/4.8/bits/memoryfwd.h:50:15: error: expected '=' before '__attribute__' namespace std _GLIBCXX_VISIBILITY(default) ^ /usr/include/c++/4.8/bits/memoryfwd.h:50:15: error: expected identifier before '__attribute__' /usr/include/c++/4.8/bits/memoryfwd.h:50:15: error: expected ';' before '__attribute__' /usr/include/c++/4.8/bits/memoryfwd.h:50:15: error: expected primary-expression before '__attribute__' /usr/include/c++/4.8/bits/memoryfwd.h:50:15: error: expected ';' before '__attribute__' /usr/include/c++/4.8/bits/stringfwd.h:42:15: error: expected '=' before '__attribute__' namespace std _GLIBCXX_VISIBILITY(default) ^ /usr/include/c++/4.8/bits/stringfwd.h:42:15: error: expected identifier before '__attribute__' /usr/include/c++/4.8/bits/stringfwd.h:42:15: error: expected ';' before '__attribute__' /usr/include/c++/4.8/bits/stringfwd.h:42:15: error: expected primary-expression before '__attribute__' /usr/include/c++/4.8/bits/stringfwd.h:42:15: error: expected ';' before '__attribute__' In file included from /usr/include/features.h:374:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:426, from /usr/include/c++/4.8/iosfwd:38, from /usr/include/c++/4.8/ios:38, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from numar9.cpp:4: /usr/include/wchar.h:132:1: error: expected unqualified-id before string constant __BEGIN_DECLS ^ In file included from /usr/include/c++/4.8/ios:39:0, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from numar9.cpp:4: /usr/include/c++/4.8/exception:35:37: error: expected '}' before end of line #pragma GCC visibility push(default) ^ /usr/include/c++/4.8/exception: At global scope: /usr/include/c++/4.8/exception:35:37: error: expected declaration before end of line
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Numar9 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ă.