結果
| 問題 | No.2784 繰り上がりなし十進和 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-14 22:21:09 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 424 bytes |
| 記録 | |
| コンパイル時間 | 377 ms |
| コンパイル使用メモリ | 85,240 KB |
| 実行使用メモリ | 334,844 KB |
| 最終ジャッジ日時 | 2026-03-06 01:49:16 |
| 合計ジャッジ時間 | 69,756 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 TLE * 6 |
ソースコード
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))