結果

問題 No.188 HAPPY DAY
コンテスト
ユーザー tomosuto
提出日時 2016-10-17 22:32:44
言語 Python2
(2.7.18)
結果
AC  
実行時間 15 ms / 1,000 ms
コード長 396 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 240 ms
コンパイル使用メモリ 8,104 KB
最終ジャッジ日時 2025-12-03 22:11:25
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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