提出 #73078894


ソースコード 拡げる

import random,time,sys    
from collections import deque,Counter,OrderedDict
from itertools import accumulate,permutations
from math import *

N,K = map(int,input().split())
ans = 0

for n in range(1,N+1):
    if sum(map(int,list(str(n)))) == K:
        ans += 1

print(ans)

提出情報

提出日時
問題 B - Digit Sum
ユーザ nishinihon
言語 Python (CPython 3.13.7)
得点 200
コード長 286 Byte
結果 AC
実行時間 62 ms
メモリ 9936 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 61 ms 9808 KiB
random_02.txt AC 60 ms 9768 KiB
random_03.txt AC 13 ms 9840 KiB
random_04.txt AC 62 ms 9844 KiB
random_05.txt AC 20 ms 9824 KiB
random_06.txt AC 59 ms 9936 KiB
random_07.txt AC 37 ms 9920 KiB
random_08.txt AC 62 ms 9876 KiB
random_09.txt AC 56 ms 9876 KiB
sample_01.txt AC 14 ms 9896 KiB
sample_02.txt AC 14 ms 9840 KiB
sample_03.txt AC 61 ms 9808 KiB