提出 #73047885


ソースコード 拡げる

n,k = map(int,input().split())
c = 0
for i in range(1,n+1):
    i = str(i)
    a = 0
    for j in i:
        a += int(j)
    if a == k: c += 1
print(c)

提出情報

提出日時
問題 B - Digit Sum
ユーザ Cenix820
言語 Python (PyPy 3.11-v7.3.20)
得点 200
コード長 159 Byte
結果 AC
実行時間 69 ms
メモリ 108580 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 3
AC × 12
セット名 テストケース
Sample sample_01.txt, sample_02.txt, sample_03.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, sample_01.txt, sample_02.txt, sample_03.txt
ケース名 結果 実行時間 メモリ
random_01.txt AC 69 ms 107992 KiB
random_02.txt AC 66 ms 107908 KiB
random_03.txt AC 48 ms 79740 KiB
random_04.txt AC 66 ms 108148 KiB
random_05.txt AC 55 ms 92268 KiB
random_06.txt AC 68 ms 108580 KiB
random_07.txt AC 64 ms 108300 KiB
random_08.txt AC 65 ms 107956 KiB
random_09.txt AC 66 ms 108004 KiB
sample_01.txt AC 49 ms 79520 KiB
sample_02.txt AC 52 ms 87336 KiB
sample_03.txt AC 65 ms 108148 KiB