Submission #5993588


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//10**4 + (i % 10**4)//10**3 + (i%10**3)//10**2 + (i%10**2)//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 200
Code Size 270 Byte
Status
Exec Time 21 ms
Memory 3060 KB

Test Cases

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