Submission #5993547


Source Code Expand

Copy
def main():
    N,A,B = map( int,input().split() )
    sum =0

    for i in range(1,N+1):
        if A <= ( i//1000 + (i%1000)//100 + (i%100)//10 + i%10 ) <=B:
            sum +=i
    print(sum)

if __name__ == "__main__":
    main()

Submission Info

Submission Time
Task ABC083B - Some Sums
User vll
Language Python3 (3.4.3)
Score 0
Code Size 243 Byte
Status
Exec Time 21 ms
Memory 2940 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 s1.txt, s2.txt, s3.txt
All 0 / 200 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 21 ms 2940 KB
02.txt 18 ms 2940 KB
03.txt 20 ms 2940 KB
04.txt 21 ms 2940 KB
05.txt 20 ms 2940 KB
06.txt 21 ms 2940 KB
07.txt 20 ms 2940 KB
08.txt 20 ms 2940 KB
s1.txt 17 ms 2940 KB
s2.txt 17 ms 2940 KB
s3.txt 17 ms 2940 KB