結果

問題 No.188 HAPPY DAY
ユーザー kumakumakumakuma
提出日時 2022-06-24 12:12:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 27 ms / 1,000 ms
コード長 892 bytes
コンパイル時間 144 ms
コンパイル使用メモリ 12,928 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-04-25 18:02:47
合計ジャッジ時間 451 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

# 月 = 日にちの総和が2015年に何日あるか
import math

# 変数
count = 0
month = []

# 月の情報(月、日数)
january = (1, 31)
february = (2, 28)
march = (3, 31)
april = (4, 30)
may = (5, 31)
june = (6, 30)
july = (7, 31)
august = (8, 31)
september = (9, 30)
october = (10, 31)
november = (11, 30)
december = (12, 31)

month.append(january)
month.append(february)
month.append(march)
month.append(april)
month.append(may)
month.append(june)
month.append(july)
month.append(august)
month.append(september)
month.append(october)
month.append(november)
month.append(december)

# 計算(1月)
for month in month:
    for i in range(month[1]):
        i += 1
        # 桁分ける
        mae = math.floor(i / 10)
        usiro = i % 10

        # 判定
        if (mae + usiro) == month[0]:
            count += 1; 

print(count)
0