QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#329090#5581. Champernowne Countjbalaty#WA 9ms9256kbPython3406b2024-02-16 13:00:252024-02-16 13:00:26

Judging History

你现在查看的是最新测评结果

  • [2024-02-16 13:00:26]
  • 评测
  • 测评结果:WA
  • 用时:9ms
  • 内存:9256kb
  • [2024-02-16 13:00:25]
  • 提交

answer

def obtainCount(n, k):
    champ = ""
    total = 0
    for i in range(1, n + 1):
        champ += f'{i}'
        numLen = len(champ)

        # For the current number, check if it's
        # divisible by k.
        remainder = 0
        for j in range(numLen):
            remainder = (remainder*10 + int(champ[j])) % k

        if remainder == 0:
            total += 1

    return total

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 9ms
memory: 9256kb

input:

4 2

output:


result:

wrong answer 1st lines differ - expected: '2', found: ''