結果

問題 No.188 HAPPY DAY
ユーザー inoino
提出日時 2022-08-21 00:35:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 36 ms / 1,000 ms
コード長 550 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-04-17 22:26:53
合計ジャッジ時間 621 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import datetime

oneday = datetime.timedelta(days=1)
baseDate = datetime.date(2015, 1, 1)
endDate = datetime.date(2015, 12, 31)


cnt = 0


def check_happy(m: int, d: int, d2: int):
    global cnt
    if m == d + d2:
        cnt += 1


while not baseDate == endDate:
    m = baseDate.month
    d = baseDate.day
    one: int = 0
    two: int = 0

    if d > 10:
        strDay = str(d)
        one = int(strDay[0])
        two = int(strDay[1])
    else:
        one = 0
        two = d

    check_happy(m, one, two)

    baseDate += oneday

print(cnt)
0