結果
| 問題 | 
                            No.2784 繰り上がりなし十進和
                             | 
                    
| コンテスト | |
| ユーザー | 
                             イルカ
                         | 
                    
| 提出日時 | 2024-06-14 22:47:33 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 524 bytes | 
| コンパイル時間 | 152 ms | 
| コンパイル使用メモリ | 82,944 KB | 
| 実行使用メモリ | 59,008 KB | 
| 最終ジャッジ日時 | 2024-06-14 22:48:22 | 
| 合計ジャッジ時間 | 2,662 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 17 WA * 19 | 
ソースコード
import math
As = [input() for _ in range(6)]
div = [
	[0],
	[0,1,2,3,4,5,6,7,8,9],
	[0,2,4,6,8],
	[0,3,6,9,2,5,8,1,4,7],
	[0,4,8,2,6],
	[0,5],
	[0,6,2,8,4],
	[0,7,4,1,8,5,2,9,6,3],
	[0,8,6,4,2],
	[0,9,8,7,6,5,4,3,2,1]
]
ans = []
for i in range(6):
	digits = [a[i] for a in As]
	cands = set()
	for j in range(6):
		add = set()
		for c in cands:
			add |= set([(c+d)%10 for d in div[int(digits[j])]])
		add |= set(div[int(digits[j])])
		cands |= add
	ans.append(len(cands))
prod = 1
for num in ans:
    prod *= num
print(prod)
            
            
            
        
            
イルカ