結果

問題 No.188 HAPPY DAY
ユーザー konabe
提出日時 2017-12-06 22:30:48
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 39 ms / 1,000 ms
コード長 451 bytes
コンパイル時間 294 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,136 KB
最終ジャッジ日時 2024-12-31 06:07:42
合計ジャッジ時間 736 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

import calendar
c = calendar.Calendar()

happy_days = 0

def is_happy_day(month, day):
    if month == day // 10 + day % 10:
        return True
    else:
        return False

for month, m_list in enumerate(c.yeardayscalendar(2015, width=12)[0], start=1):
    for w_list in m_list:
        for day in w_list:
            if day == 0:
                continue
            if is_happy_day(month, day):
                happy_days += 1

print(happy_days)
0