結果

問題 No.188 HAPPY DAY
コンテスト
ユーザー T
提出日時 2025-11-14 15:43:03
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 93 ms / 1,000 ms
+ 392µs
コード長 440 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 297 ms
コンパイル使用メモリ 21,412 KB
実行使用メモリ 15,868 KB
最終ジャッジ日時 2026-07-16 14:00:54
合計ジャッジ時間 1,278 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from datetime import date, timedelta
#日付を取得
start = date(2015,1,1)
end = date(2015,12,31)

current = start
counter = 0

while current <= end:
	#月と日にちの数値を取得
	month = current.month
	d_tens = current.day//10
	d_ones = current.day%10
	
	#ハッピーデイを探す
	if (month == (d_tens + d_ones)):
		counter +=1
		#翌日へ
		current += timedelta(days=1)
	else:
		current += timedelta(days=1)
	
print(counter)
0