#3635
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 | #60145839 | Utilizator | |
| Fișier | arithmetic_equality.cpp | Dimensiune | 3.07 KB |
| Data încărcării | 19 Octombrie 2025, 19:49 | Scor/rezultat | Eroare de compilare |
arithmetic_equality.cpp:17:27: error: 'std::vector<long long int> pow10' redeclared as different kind of symbol vector<ll> fact, invfact, pow10; ^ In file included from /usr/include/features.h:374:0, from /usr/include/assert.h:35, from /usr/include/c++/4.8/cassert:43, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:33, from arithmetic_equality.cpp:1: /usr/include/i386-linux-gnu/bits/mathcalls.h:122:1: error: previous declaration of 'double pow10(double)' __MATHCALL (pow10,, (_Mdouble_ __x)); ^ arithmetic_equality.cpp: In function 'int main()': arithmetic_equality.cpp:85:11: error: request for member 'assign' in 'pow10', which is of non-class type 'double(double)throw ()' pow10.assign(n+1, 1); ^ arithmetic_equality.cpp:86:41: warning: pointer to a function used in arithmetic [-Wpointer-arith] for (int i = 1; i <= n; ++i) pow10[i] = pow10[i-1] * 10 % MOD; ^ arithmetic_equality.cpp:86:54: warning: pointer to a function used in arithmetic [-Wpointer-arith] for (int i = 1; i <= n; ++i) pow10[i] = pow10[i-1] * 10 % MOD; ^ arithmetic_equality.cpp:86:54: warning: pointer to a function used in arithmetic [-Wpointer-arith] arithmetic_equality.cpp:86:58: error: invalid operands of types 'double(double)throw ()' and 'int' to binary 'operator*' for (int i = 1; i <= n; ++i) pow10[i] = pow10[i-1] * 10 % MOD; ^ arithmetic_equality.cpp:89:23: warning: pointer to a function used in arithmetic [-Wpointer-arith] repunit = (pow10[n] + MOD - 1) % MOD * inv9 % MOD; ^ arithmetic_equality.cpp:89:27: warning: pointer to a function used in arithmetic [-Wpointer-arith] repunit = (pow10[n] + MOD - 1) % MOD * inv9 % MOD; ^ arithmetic_equality.cpp:89:33: warning: pointer to a function used in arithmetic [-Wpointer-arith] repunit = (pow10[n] + MOD - 1) % MOD * inv9 % MOD; ^ arithmetic_equality.cpp:89:38: error: invalid operands of types 'double (*)(double)throw ()' and 'const ll {aka const long long int}' to binary 'operator%' repunit = (pow10[n] + MOD - 1) % MOD * inv9 % MOD; ^
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ă.