結果

問題 No.188 HAPPY DAY
ユーザー tomosutotomosuto
提出日時 2016-10-17 22:32:44
言語 Python2
(2.7.18)
結果
AC  
実行時間 15 ms / 1,000 ms
コード長 396 bytes
コンパイル時間 63 ms
コンパイル使用メモリ 6,644 KB
実行使用メモリ 6,468 KB
最終ジャッジ日時 2023-08-29 22:20:40
合計ジャッジ時間 499 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
6,468 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import calendar
dateList = []
for i in range(1, 13):
	first, date = calendar.monthrange(2015, i)
	dateList.append(date)

month = 0
happyDays = 0
for days in dateList:
    month += 1
    for date in range(1, days):
        if date < 10:
            if month == date:
                happyDays += 1
        else:
            if month == sum(map(int, str(date))):
				happyDays += 1

print happyDays
0