結果

問題 No.1926 Sequence of Remainders
ユーザー ripityripity
提出日時 2022-03-03 19:43:23
言語 Java21
(openjdk 21)
結果
AC  
実行時間 1,146 ms / 2,000 ms
コード長 583 bytes
コンパイル時間 2,631 ms
コンパイル使用メモリ 74,416 KB
実行使用メモリ 70,484 KB
最終ジャッジ日時 2024-04-17 10:53:20
合計ジャッジ時間 43,702 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
53,888 KB
testcase_01 AC 941 ms
69,356 KB
testcase_02 AC 932 ms
65,396 KB
testcase_03 AC 912 ms
68,728 KB
testcase_04 AC 960 ms
66,896 KB
testcase_05 AC 958 ms
69,388 KB
testcase_06 AC 1,072 ms
69,404 KB
testcase_07 AC 1,109 ms
69,008 KB
testcase_08 AC 1,144 ms
68,976 KB
testcase_09 AC 1,012 ms
69,312 KB
testcase_10 AC 1,114 ms
69,844 KB
testcase_11 AC 1,141 ms
69,464 KB
testcase_12 AC 1,090 ms
69,764 KB
testcase_13 AC 1,121 ms
69,524 KB
testcase_14 AC 1,004 ms
69,584 KB
testcase_15 AC 1,113 ms
69,612 KB
testcase_16 AC 1,119 ms
69,588 KB
testcase_17 AC 1,114 ms
69,236 KB
testcase_18 AC 1,109 ms
69,292 KB
testcase_19 AC 1,116 ms
70,032 KB
testcase_20 AC 1,146 ms
69,584 KB
testcase_21 AC 1,109 ms
69,620 KB
testcase_22 AC 1,088 ms
69,496 KB
testcase_23 AC 1,130 ms
69,644 KB
testcase_24 AC 1,105 ms
69,532 KB
testcase_25 AC 1,136 ms
69,544 KB
testcase_26 AC 1,088 ms
69,416 KB
testcase_27 AC 1,084 ms
69,148 KB
testcase_28 AC 1,117 ms
69,248 KB
testcase_29 AC 1,123 ms
69,464 KB
testcase_30 AC 1,139 ms
70,484 KB
testcase_31 AC 1,101 ms
69,552 KB
testcase_32 AC 1,122 ms
70,304 KB
testcase_33 AC 1,129 ms
70,464 KB
testcase_34 AC 1,094 ms
69,420 KB
testcase_35 AC 1,080 ms
69,528 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;

public class Main {
    
    public static Scanner sc = new Scanner(System.in);
    public static PrintWriter pw = new PrintWriter(System.out);
    
    public static void main(String[] args) {
        
        int t = sc.nextInt();
        while( t > 0 ) {
            solve();
            t--;
        }
        
        pw.flush();
        
    }
    
    static void solve() {
        
        int N = sc.nextInt();
        int M = sc.nextInt();
        int K = sc.nextInt();
        pw.println( K%M < M-N ? K%M : 0 );
        
    }
    
}
0