結果

問題 No.188 HAPPY DAY
ユーザー konabekonabe
提出日時 2017-12-06 22:30:48
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 31 ms / 1,000 ms
コード長 451 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 10,796 KB
実行使用メモリ 9,768 KB
最終ジャッジ日時 2023-08-30 01:32:15
合計ジャッジ時間 613 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

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

ソースコード

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