#3635
Arithmetic Equality
Dându-se un număr n
, se vrea aflarea numărului de numere de n
cifre există care au suma și produsul cifrelor egale.
IOIT 2020-21, Runda 1
Problema | Arithmetic Equality | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 64 MB
|
Id soluție | #40831742 | Utilizator | |
Fișier | arithmetic_equality.cpp | Dimensiune | 769 B |
Data încărcării | 24 Decembrie 2022, 20:49 | Scor / rezultat | Eroare de compilare |
arithmetic_equality.cpp:3:8: error: 'MAX_DIGITS' was not declared in this scope int dp[MAX_DIGITS+1][MAX_SUM+1]; ^ arithmetic_equality.cpp:3:22: error: 'MAX_SUM' was not declared in this scope int dp[MAX_DIGITS+1][MAX_SUM+1]; ^ arithmetic_equality.cpp: In function 'void solve(int)': arithmetic_equality.cpp:7:24: error: 'MAX_SUM' was not declared in this scope for (int j = 0; j <= MAX_SUM; j++) { ^ arithmetic_equality.cpp:8:5: error: 'dp' was not declared in this scope dp[1][j] = is_valid_digit(j); ^ arithmetic_equality.cpp:8:32: error: 'is_valid_digit' was not declared in this scope dp[1][j] = is_valid_digit(j); ^ arithmetic_equality.cpp:13:26: error: 'MAX_SUM' was not declared in this scope for (int j = 0; j <= MAX_SUM; j++) { ^ arithmetic_equality.cpp:14:7: error: 'dp' was not declared in this scope dp[i][j] = 0; ^ arithmetic_equality.cpp:16:31: error: 'is_valid_digit' was not declared in this scope if (is_valid_digit(j-k)) { ^ arithmetic_equality.cpp:25:24: error: 'MAX_SUM' was not declared in this scope for (int k = 1; k <= MAX_SUM; k++) { ^ arithmetic_equality.cpp:26:37: error: 'is_valid_n_digit_number' was not declared in this scope if (is_valid_n_digit_number(k, n)) { ^ arithmetic_equality.cpp:27:26: error: 'dp' was not declared in this scope result = (result + dp[n][k]) % MOD; ^ arithmetic_equality.cpp:30:10: error: return-statement with a value, in function returning 'void' [-fpermissive] return result; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Arithmetic Equality 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ă.