結果
| 問題 | No.1926 Sequence of Remainders |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-18 16:59:06 |
| 言語 | Go (1.23.4) |
| 結果 |
AC
|
| 実行時間 | 195 ms / 2,000 ms |
| コード長 | 389 bytes |
| コンパイル時間 | 16,338 ms |
| コンパイル使用メモリ | 229,460 KB |
| 実行使用メモリ | 6,144 KB |
| 最終ジャッジ日時 | 2024-06-29 00:29:58 |
| 合計ジャッジ時間 | 28,487 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 35 |
ソースコード
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)
}
}