結果

問題 No.188 HAPPY DAY
ユーザー ondy_candyondy_candy
提出日時 2016-08-02 03:09:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 19 ms / 1,000 ms
コード長 433 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 10,576 KB
実行使用メモリ 8,680 KB
最終ジャッジ日時 2023-08-29 22:18:01
合計ジャッジ時間 587 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

# -*- coding: utf-8 -*-
import datetime

def is_date(year, month, day):
    try:
        datetime.date(year, month, day)
        return True
    except ValueError:
        return False

result = 0
# 1 - 12
for x in range(1,13):
    # 0 - 3
    for a in range(4):
        b = x - a
        if b < 0 or 9 < b:
            continue
        y = int(str(a) + str(b))
        if is_date(2015, x, y):
            result += 1

print(result)
0