#1287
Se dau două cifre a b și un număr n. Să se genereze toate numerele cu exact n cifre cuprinse între a și b.
| Problema | CifreGen | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64140437 | Utilizator | |
| Fișier | cifregen.cpp | Dimensiune | 598 B |
| Data încărcării | 20 Aprilie 2026, 09:58 | Scor/rezultat | Eroare de compilare |
cifregen.cpp: In function ‘int evalid()’: cifregen.cpp:13:2: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 13 | for(i=1;i<k;i++) | ^~~ cifregen.cpp:16:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 16 | return 1;} | ^~~~~~ cifregen.cpp: In function ‘void run()’: cifregen.cpp:32:16: error: expected ‘while’ before ‘}’ token 32 | else k--;}} | ^ cifregen.cpp:32:16: error: expected ‘(’ before ‘}’ token 32 | else k--;}} | ^ | ( cifregen.cpp:32:16: error: expected primary-expression before ‘}’ token cifregen.cpp:32:16: error: expected ‘)’ before ‘}’ token 32 | else k--;}} | ^ | ) cifregen.cpp:32:16: error: expected ‘;’ before ‘}’ token 32 | else k--;}} | ^ | ; cifregen.cpp:33:10: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 33 | int main() | ^~ cifregen.cpp:33:10: note: remove parentheses to default-initialize a variable 33 | int main() | ^~ | -- cifregen.cpp:33:10: note: or replace parentheses with braces to value-initialize a variable cifregen.cpp:34:2: error: a function-definition is not allowed here before ‘{’ token 34 | {cin>>n;run(); | ^ cifregen.cpp:35:13: error: expected ‘}’ at end of input 35 | return 0;} | ^ cifregen.cpp:25:1: note: to match this ‘{’ 25 | {int as;k=1;init(); | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema CifreGen 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ă.