Skip to content

Commit 6d288df

Browse files
authored
Solution
1 parent b71061d commit 6d288df

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/python3
2+
3+
import math
4+
import os
5+
import random
6+
import re
7+
import sys
8+
from decimal import *
9+
10+
# Complete the beautifulDays function below.
11+
def beautifulDays(i, j, k):
12+
count=0
13+
for l in range(i,j+1):
14+
n = (str(l)[::-1])
15+
if(abs(l-int(n))%k ==0):
16+
count+=1
17+
return count
18+
19+
if __name__ == '__main__':
20+
fptr = open(os.environ['OUTPUT_PATH'], 'w')
21+
22+
ijk = input().split()
23+
24+
i = int(ijk[0])
25+
26+
j = int(ijk[1])
27+
28+
k = int(ijk[2])
29+
30+
result = beautifulDays(i, j, k)

0 commit comments

Comments
 (0)