結果
| 問題 |
No.2784 繰り上がりなし十進和
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-14 21:43:27 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 548 bytes |
| コンパイル時間 | 466 ms |
| コンパイル使用メモリ | 82,392 KB |
| 実行使用メモリ | 197,644 KB |
| 最終ジャッジ日時 | 2024-06-14 21:43:37 |
| 合計ジャッジ時間 | 8,444 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 WA * 31 |
ソースコード
from itertools import product
A = [input() for i in range(6)]
AA = [list(map(int, list(a))) for a in A]
canvisit = set()
def f(a1, a2, a3, a4, a5, a6):
now = [0] * 6
for i in range(6):
now[i] = AA[0][i] * a1 + AA[1][i] * a2 + AA[2][i] * a3 + AA[3][i] * a4 + AA[4][i] * a5 + AA[5][i] * a6
if now[i] > 9:
return -1
return ''.join(map(str, now))
for a1, a2, a3, a4, a5, a6 in product(range(10), repeat=6):
now = f(a1, a2, a3, a4, a5, a6)
if now != -1:
canvisit.add(now)
print(len(canvisit))