結果

問題 No.1926 Sequence of Remainders
ユーザー scrappyscrappy
提出日時 2022-10-18 16:59:06
言語 Go
(1.22.1)
結果
AC  
実行時間 199 ms / 2,000 ms
コード長 389 bytes
コンパイル時間 15,851 ms
コンパイル使用メモリ 208,000 KB
実行使用メモリ 8,044 KB
最終ジャッジ日時 2023-09-11 09:52:59
合計ジャッジ時間 29,548 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,328 KB
testcase_01 AC 176 ms
7,868 KB
testcase_02 AC 176 ms
7,868 KB
testcase_03 AC 176 ms
7,872 KB
testcase_04 AC 177 ms
7,868 KB
testcase_05 AC 175 ms
7,868 KB
testcase_06 AC 196 ms
7,944 KB
testcase_07 AC 193 ms
7,952 KB
testcase_08 AC 193 ms
7,944 KB
testcase_09 AC 191 ms
7,944 KB
testcase_10 AC 194 ms
7,948 KB
testcase_11 AC 194 ms
7,944 KB
testcase_12 AC 195 ms
8,036 KB
testcase_13 AC 193 ms
7,944 KB
testcase_14 AC 191 ms
7,948 KB
testcase_15 AC 192 ms
8,040 KB
testcase_16 AC 192 ms
7,944 KB
testcase_17 AC 191 ms
7,944 KB
testcase_18 AC 192 ms
7,944 KB
testcase_19 AC 194 ms
7,944 KB
testcase_20 AC 193 ms
7,940 KB
testcase_21 AC 192 ms
7,944 KB
testcase_22 AC 197 ms
8,036 KB
testcase_23 AC 196 ms
7,952 KB
testcase_24 AC 194 ms
7,948 KB
testcase_25 AC 196 ms
8,044 KB
testcase_26 AC 195 ms
7,948 KB
testcase_27 AC 198 ms
8,040 KB
testcase_28 AC 199 ms
8,040 KB
testcase_29 AC 196 ms
7,948 KB
testcase_30 AC 194 ms
8,040 KB
testcase_31 AC 194 ms
8,040 KB
testcase_32 AC 197 ms
8,040 KB
testcase_33 AC 193 ms
7,864 KB
testcase_34 AC 193 ms
7,952 KB
testcase_35 AC 194 ms
7,948 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	sc := bufio.NewScanner(os.Stdin)
	sc.Scan()
	T, _ := strconv.Atoi(sc.Text())
	for t := 0; t < T; t++ {
		sc.Scan()
		ss := strings.Fields(sc.Text())
		N, _ := strconv.Atoi(ss[0])
		M, _ := strconv.Atoi(ss[1])
		K, _ := strconv.Atoi(ss[2])

		a := K % M
		if N >= M-a {
			a = 0
		}
		fmt.Println(a)
	}
}
0