import numpy as np import calendar if __name__ == "__main__": count = 0 for i in range(1, 13): #1~12月 days = calendar.monthrange(2015, i)[1] #月ごとの日数 for j in range(1, days+1): if i == (j // 10 + j % 10): count += 1 print(count)