結果

問題 No.188 HAPPY DAY
ユーザー mahiromahiro
提出日時 2020-01-11 17:26:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 21 ms / 1,000 ms
コード長 353 bytes
コンパイル時間 110 ms
コンパイル使用メモリ 10,664 KB
実行使用メモリ 8,636 KB
最終ジャッジ日時 2023-08-16 15:07:05
合計ジャッジ時間 672 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import datetime

ans = 0
now_date = datetime.datetime(2015, 1, 1)
end_date = datetime.datetime(2015, 12, 31)
while True:
    month = now_date.month
    day = now_date.day
    digit_sum = eval("+".join(str(day)))
    if month == digit_sum:
        ans += 1
    now_date += datetime.timedelta(days=1)
    if now_date > end_date:
        break
print(ans)

0