結果

問題 No.296 n度寝
ユーザー ゆうPゆうP
提出日時 2024-03-16 14:23:26
言語 Go
(1.22.1)
結果
AC  
実行時間 10 ms / 1,000 ms
コード長 358 bytes
コンパイル時間 16,231 ms
コンパイル使用メモリ 224,808 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-03-16 14:23:43
合計ジャッジ時間 13,890 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
6,548 KB
testcase_01 AC 4 ms
6,676 KB
testcase_02 AC 3 ms
6,676 KB
testcase_03 AC 1 ms
6,676 KB
testcase_04 AC 1 ms
6,676 KB
testcase_05 AC 2 ms
6,676 KB
testcase_06 AC 2 ms
6,676 KB
testcase_07 AC 10 ms
6,676 KB
testcase_08 AC 9 ms
6,676 KB
testcase_09 AC 1 ms
6,676 KB
testcase_10 AC 1 ms
6,676 KB
testcase_11 AC 1 ms
6,676 KB
testcase_12 AC 2 ms
6,676 KB
testcase_13 AC 1 ms
6,676 KB
testcase_14 AC 1 ms
6,676 KB
testcase_15 AC 2 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

// No.296 n度寝
package main

import (
	"fmt"
	"time"
)

func main() {
	var n, h, m, t int // N度寝、アラームH、M、アラーム間隔

	fmt.Scan(&n, &h, &m, &t)
	ans := time.Date(1, 1, 1, h, m, 0, 0, time.Local)
	for i := n; i > 1; i-- {
		ans = ans.Add(time.Minute * time.Duration(t))
	}
	fmt.Println(ans.Hour())
	fmt.Println(ans.Minute())
}
0