結果
問題 | No.188 HAPPY DAY |
ユーザー |
|
提出日時 | 2019-04-03 15:56:57 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 38 ms / 1,000 ms |
コード長 | 430 bytes |
コンパイル時間 | 81 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 12,544 KB |
最終ジャッジ日時 | 2024-12-21 13:51:21 |
合計ジャッジ時間 | 679 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
ソースコード
import datetimedef getHappyNumber(day: int):strDay = str(day)sum = 0for i in range(len(strDay)):sum += int(strDay[i])return sumcurrent = datetime.datetime.strptime('2015/01/01', '%Y/%m/%d')count = 0while current.year == 2015:current = current + datetime.timedelta(days=1)happyNumber = getHappyNumber(current.day)if current.month == happyNumber:count += 1print(count)