結果
問題 |
No.2784 繰り上がりなし十進和
|
ユーザー |
![]() |
提出日時 | 2024-06-20 03:12:04 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 383 bytes |
コンパイル時間 | 326 ms |
コンパイル使用メモリ | 82,344 KB |
実行使用メモリ | 124,496 KB |
最終ジャッジ日時 | 2024-06-20 03:12:35 |
合計ジャッジ時間 | 29,830 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 TLE * 5 |
ソースコード
import sys input = sys.stdin.readline B=10 A=[int(input()) for i in range(6)] U=[10**i for i in range(6)] def calc(x,y): ANS=0 for i in U: ANS += ((x//i + y//i)%B) * i 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))