結果

問題 No.296 n度寝
ユーザー S Y
提出日時 2024-12-20 16:19:11
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 441 ms / 1,000 ms
コード長 425 bytes
コンパイル時間 208 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-12-20 16:19:15
合計ジャッジ時間 3,123 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    n, h, m, t = map(int, input().split(' '))
    
    for i in range(n-1):
        # print(f'{h}:{m}')
        res_lst = calc_time(h, m, t)
        h = res_lst[0]
        m = res_lst[1]

    print(h)
    print(m)

def calc_time(h, m, t):
    time = h*60+m+t
    # print(time)
    time = time%1440
    # print(time)
    h = time//60
    m = time%60

    return [h, m]
    


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