#944
Un număr natural se împarte la toate numerele obținute din el prin eliminarea unei cifre. Care este restul maxim care se poate obține?
| Problema | rest | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #63629760 | Utilizator | |
| Fișier | rest.cpp | Dimensiune | 1.77 KB |
| Data încărcării | 11 Martie 2026, 21:57 | Scor/rezultat | Eroare de compilare |
rest.cpp:17:25: error: stray '#' in program while (temp > 0)#include <iostream> ^ rest.cpp:73:2: error: stray '#' in program }#include <iostream> ^ rest.cpp: In function 'int main()': rest.cpp:17:26: error: 'include' was not declared in this scope while (temp > 0)#include <iostream> ^ rest.cpp:17:43: error: expected primary-expression before '>' token while (temp > 0)#include <iostream> ^ rest.cpp:20:1: error: expected primary-expression before 'using' using namespace std; ^ rest.cpp:20:1: error: expected ';' before 'using' rest.cpp:23:1: error: a function-definition is not allowed here before '{' token { ^ rest.cpp:109:1: error: expected '}' at end of input } ^ rest.cpp:16:13: warning: unused variable 'nr' [-Wunused-variable] int nr = 0,i=1,k=0,x; ^ rest.cpp:16:20: warning: unused variable 'i' [-Wunused-variable] int nr = 0,i=1,k=0,x; ^ rest.cpp:16:24: warning: unused variable 'k' [-Wunused-variable] int nr = 0,i=1,k=0,x; ^ rest.cpp:16:28: warning: unused variable 'x' [-Wunused-variable] int nr = 0,i=1,k=0,x; ^ rest.cpp:9:11: warning: unused variable 'maxim' [-Wunused-variable] int n,maxim = -1,temp,cnt=0,rest,j=0; ^ rest.cpp:9:33: warning: unused variable 'rest' [-Wunused-variable] int n,maxim = -1,temp,cnt=0,rest,j=0; ^ rest.cpp:109:1: error: expected '}' at end of input } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema rest 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ă.