Submission #1898214
Source Code Expand
n,a,b=map(int, input().split())
s=0;
for i in range(n+1):
nl=list(str(i))
ns=0;
for j in range(len(nl)):
ns+=int(nl[j]);
if (ns>=a and ns<=b):
s+=i
print(s)
Submission Info
| Submission Time | |
|---|---|
| Task | B - Some Sums |
| User | w_takashiro |
| Language | Python (3.4.3) |
| Score | 200 |
| Code Size | 199 Byte |
| Status | AC |
| Exec Time | 42 ms |
| Memory | 3060 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | s1.txt, s2.txt, s3.txt |
| All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, s1.txt, s2.txt, s3.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 01.txt | AC | 42 ms | 2940 KiB |
| 02.txt | AC | 26 ms | 2940 KiB |
| 03.txt | AC | 40 ms | 2940 KiB |
| 04.txt | AC | 40 ms | 2940 KiB |
| 05.txt | AC | 39 ms | 2940 KiB |
| 06.txt | AC | 41 ms | 2940 KiB |
| 07.txt | AC | 40 ms | 2940 KiB |
| 08.txt | AC | 35 ms | 2940 KiB |
| s1.txt | AC | 18 ms | 3060 KiB |
| s2.txt | AC | 17 ms | 2940 KiB |
| s3.txt | AC | 18 ms | 2940 KiB |