結果
| 問題 | No.2784 繰り上がりなし十進和 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-14 22:21:09 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 424 bytes |
| 記録 | |
| コンパイル時間 | 279 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 89,688 KB |
| 最終ジャッジ日時 | 2024-06-14 22:21:24 |
| 合計ジャッジ時間 | 6,702 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 35 |
ソースコード
import itertools
def xadd(a, b):
res = 0
for i in range(6):
res += (a // 10 ** i + b // 10 ** i) % 10 * (10 ** i)
return res
def xmul(a, x):
res = 0
for i in range(6):
res += (a // 10 ** i * x) % 10 * (10 ** i)
return res
a = [int(input()) for _ in range(6)]
st = set()
for k in itertools.product(range(10), repeat=6):
s = 0
for i in range(6):
s = xadd(xmul(a[i], k[i]), s)
st.add(s)
print(len(st))