結果

問題 No.32 貯金箱の憂鬱
ユーザー tmtm
提出日時 2022-11-17 22:03:23
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 33 ms / 5,000 ms
コード長 518 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 11,896 KB
実行使用メモリ 10,064 KB
最終ジャッジ日時 2023-10-19 12:27:36
合計ジャッジ時間 1,152 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
10,064 KB
testcase_01 AC 33 ms
10,064 KB
testcase_02 AC 31 ms
10,064 KB
testcase_03 AC 31 ms
10,064 KB
testcase_04 AC 30 ms
10,064 KB
testcase_05 AC 32 ms
10,064 KB
testcase_06 AC 32 ms
10,064 KB
testcase_07 AC 30 ms
10,064 KB
testcase_08 AC 31 ms
10,064 KB
testcase_09 AC 32 ms
10,064 KB
testcase_10 AC 31 ms
10,064 KB
testcase_11 AC 30 ms
10,064 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    l = input()
    m = input()
    n = input()
    print(logic(int(l), int(m), int(n)))


def logic(l: int, m: int, n: int) -> int:
    n_quotient = n // 25
    n_reminder = n % 25
    m = m + n_quotient

    m_quotient = (m * 25) // 100
    m_reminder = (m * 25) % 100
    m_reminder /= 25
    l = l + m_quotient

    l_quotient = (l * 100) // 1000
    l_reminder = (l * 100) % 1000
    l_reminder /= 100

    return int(n_reminder + m_reminder + l_reminder)
    

if __name__ == "__main__":
    main()
0