結果
| 問題 |
No.2784 繰り上がりなし十進和
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2024-06-20 02:58:16 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 369 bytes |
| コンパイル時間 | 472 ms |
| コンパイル使用メモリ | 82,072 KB |
| 実行使用メモリ | 83,888 KB |
| 最終ジャッジ日時 | 2024-06-20 02:58:25 |
| 合計ジャッジ時間 | 8,893 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 28 TLE * 2 |
ソースコード
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
for i in range(10**6):
if DP[i]==1:
for a in A:
DP[calc(i,a)]=1
print(sum(DP))
titia