結果

問題 No.2784 繰り上がりなし十進和
ユーザー rin204rin204
提出日時 2024-06-14 22:06:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,175 ms / 2,000 ms
コード長 428 bytes
コンパイル時間 318 ms
コンパイル使用メモリ 82,552 KB
実行使用メモリ 125,944 KB
最終ジャッジ日時 2024-06-14 22:07:00
合計ジャッジ時間 16,137 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
65,876 KB
testcase_01 AC 52 ms
67,356 KB
testcase_02 AC 805 ms
125,652 KB
testcase_03 AC 48 ms
66,584 KB
testcase_04 AC 48 ms
66,300 KB
testcase_05 AC 46 ms
65,440 KB
testcase_06 AC 49 ms
66,408 KB
testcase_07 AC 49 ms
66,680 KB
testcase_08 AC 60 ms
72,248 KB
testcase_09 AC 60 ms
75,488 KB
testcase_10 AC 59 ms
75,344 KB
testcase_11 AC 60 ms
75,676 KB
testcase_12 AC 787 ms
125,672 KB
testcase_13 AC 802 ms
125,660 KB
testcase_14 AC 271 ms
91,404 KB
testcase_15 AC 128 ms
84,836 KB
testcase_16 AC 178 ms
86,348 KB
testcase_17 AC 610 ms
101,368 KB
testcase_18 AC 658 ms
101,552 KB
testcase_19 AC 196 ms
86,252 KB
testcase_20 AC 1,145 ms
125,588 KB
testcase_21 AC 189 ms
86,192 KB
testcase_22 AC 1,164 ms
125,472 KB
testcase_23 AC 113 ms
84,600 KB
testcase_24 AC 300 ms
88,432 KB
testcase_25 AC 582 ms
101,416 KB
testcase_26 AC 1,148 ms
125,396 KB
testcase_27 AC 1,175 ms
125,528 KB
testcase_28 AC 312 ms
90,792 KB
testcase_29 AC 1,172 ms
125,944 KB
testcase_30 AC 366 ms
90,688 KB
testcase_31 AC 189 ms
86,060 KB
testcase_32 AC 636 ms
101,252 KB
testcase_33 AC 544 ms
101,308 KB
testcase_34 AC 298 ms
88,736 KB
testcase_35 AC 131 ms
84,904 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A = [int(input()) for _ in range(6)]


def add(a, b):
    t = 1
    c = 0
    for _ in range(6):
        d = (a % 10 + b % 10) % 10
        c += d * t
        t *= 10
        a //= 10
        b //= 10
    return c


n = 10**6
used = [False] * n
used[0] = True
st = [0]
while st:
    x = st.pop()
    for a in A:
        y = add(x, a)
        if not used[y]:
            used[y] = True
            st.append(y)

print(sum(used))
0