結果

問題 No.1926 Sequence of Remainders
ユーザー AEnAEn
提出日時 2022-05-11 17:52:07
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 351 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 87,184 KB
実行使用メモリ 79,164 KB
最終ジャッジ日時 2023-09-26 07:56:20
合計ジャッジ時間 15,684 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,320 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 320 ms
78,396 KB
testcase_07 AC 319 ms
78,428 KB
testcase_08 AC 315 ms
78,580 KB
testcase_09 AC 314 ms
78,360 KB
testcase_10 AC 317 ms
78,404 KB
testcase_11 AC 310 ms
78,568 KB
testcase_12 AC 316 ms
78,536 KB
testcase_13 AC 321 ms
78,692 KB
testcase_14 AC 325 ms
78,460 KB
testcase_15 AC 326 ms
78,600 KB
testcase_16 AC 332 ms
78,624 KB
testcase_17 AC 317 ms
78,560 KB
testcase_18 AC 334 ms
78,712 KB
testcase_19 AC 323 ms
78,572 KB
testcase_20 AC 325 ms
78,664 KB
testcase_21 AC 318 ms
78,572 KB
testcase_22 AC 323 ms
78,544 KB
testcase_23 AC 328 ms
78,576 KB
testcase_24 AC 338 ms
78,392 KB
testcase_25 AC 331 ms
78,456 KB
testcase_26 AC 319 ms
78,512 KB
testcase_27 AC 321 ms
78,420 KB
testcase_28 AC 324 ms
78,592 KB
testcase_29 AC 320 ms
78,528 KB
testcase_30 AC 318 ms
78,708 KB
testcase_31 AC 321 ms
78,704 KB
testcase_32 AC 327 ms
78,588 KB
testcase_33 AC 318 ms
78,640 KB
testcase_34 AC 325 ms
78,528 KB
testcase_35 AC 326 ms
78,620 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
for i in range(T):
    N, M, K = map(int, input().split())
    a = K%M
    cnt = 1
    while cnt <= N:
        if a >= (M-cnt):
            a %= (M-cnt)
            cnt += 1
        else:
            if a < (M-N):
                print(a)
                cnt = N+1
            else:
                print(0)
                cnt = N+1
0