結果
| 問題 |
No.188 HAPPY DAY
|
| コンテスト | |
| ユーザー |
mega_yadoran
|
| 提出日時 | 2018-10-22 10:39:06 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 748 bytes |
| コンパイル時間 | 282 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-11-19 03:39:19 |
| 合計ジャッジ時間 | 715 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 1 |
ソースコード
#!/bin/python
# Python 3.6+ で動作します。
# 2015 年の中で 4/22 : 4 = 2 + 2 の様な日付を探します
import datetime
current_date = datetime.date(2015, 1, 1)
end_date = datetime.date(2016, 1, 1)
a_day_duration = datetime.timedelta(days=1)
def is_happy_day(date):
m = date.month
d = date.day
if d < 10:
return m == d
else:
str_d = str(d)
s = int(str_d[0]) + int(str_d[1])
return m == s
if __name__ == '__main__':
count_of_happy_day = 0
while current_date < end_date:
if is_happy_day(current_date):
print(f'isHappy: {current_date}')
count_of_happy_day += 1
current_date = current_date + a_day_duration
print(count_of_happy_day)
mega_yadoran