結果

問題 No.296 n度寝
ユーザー cm-araicm-arai
提出日時 2021-01-02 20:24:35
言語 Go
(1.22.1)
結果
WA  
実行時間 -
コード長 573 bytes
コンパイル時間 14,497 ms
コンパイル使用メモリ 235,092 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-20 14:50:35
合計ジャッジ時間 15,382 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

package main

import (
	"fmt"
	"time"
)

func scan() (N int, H int, M int, T int) {
	fmt.Scan(&N, &H, &M, &T)
	return

}

func main() {
	var N, H, M, T int
	// N, H, M, T = scan()
	// N, H, M, T = 2, 7, 30, 5
	// N, H, M, T = 7, 8, 0, 5
	// N, H, M, T = 786679, 9, 42, 1001
	// N, H, M, T = 109778, 21, 59, 73
	N, H, M, T = 1000000, 23, 59, 1440
	t := time.Date(2000, 1, 1, H, M, 0, 0, time.UTC)
	// t = t.Add(time.Duration((N-1)*T) * time.Minute)
	for i := 0; i < N-1; i++ {
		t = t.Add(time.Duration(T) * time.Minute)
	}
	fmt.Println(t.Hour())
	fmt.Println(t.Minute())
}
0