結果
問題 |
No.2784 繰り上がりなし十進和
|
ユーザー |
![]() |
提出日時 | 2024-06-20 03:05:01 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 414 bytes |
コンパイル時間 | 345 ms |
コンパイル使用メモリ | 82,100 KB |
実行使用メモリ | 126,004 KB |
最終ジャッジ日時 | 2024-06-20 03:05:38 |
合計ジャッジ時間 | 37,155 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 28 TLE * 8 |
ソースコード
import sys input = sys.stdin.readline A=[int(input()) for i in range(6)] def calc(x,y): ANS=0 for i in range(6): c=((x//(10**i)%10 + y//(10**i)%10)%10) * (10**i) #print(i,c) ANS+=c return ANS DP=[0]*(10**6) DP[0]=1 Q=[0] while Q: x=Q.pop() for a in A: to=calc(a,x) if DP[to]==0: DP[to]=1 Q.append(to) print(sum(DP))