Submission #73051170
Source Code Expand
#ABC
#目標は6完、そのために30分でA-D
N,K=map(int,input().split())
ans=0
for i in range(1,N+1) :
i=str(i)
S=0
for j in range(len(i)) :
S+=int(i[j])
if S==K :
ans+=1
print(ans)
Submission Info
| Submission Time | |
|---|---|
| Task | B - Digit Sum |
| User | Youteru |
| Language | Python (PyPy 3.11-v7.3.20) |
| Score | 200 |
| Code Size | 231 Byte |
| Status | AC |
| Exec Time | 66 ms |
| Memory | 108656 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| 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 |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| random_01.txt | AC | 66 ms | 108656 KiB |
| random_02.txt | AC | 62 ms | 108324 KiB |
| random_03.txt | AC | 47 ms | 79856 KiB |
| random_04.txt | AC | 63 ms | 108264 KiB |
| random_05.txt | AC | 53 ms | 90916 KiB |
| random_06.txt | AC | 66 ms | 108504 KiB |
| random_07.txt | AC | 61 ms | 102664 KiB |
| random_08.txt | AC | 63 ms | 108384 KiB |
| random_09.txt | AC | 63 ms | 108276 KiB |
| sample_01.txt | AC | 47 ms | 79740 KiB |
| sample_02.txt | AC | 53 ms | 88016 KiB |
| sample_03.txt | AC | 65 ms | 108516 KiB |