結果

問題 No.1926 Sequence of Remainders
ユーザー AEn
提出日時 2022-05-11 17:52:07
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 351 bytes
コンパイル時間 218 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 77,056 KB
最終ジャッジ日時 2024-07-19 03:02:44
合計ジャッジ時間 15,509 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 30 WA * 5
権限があれば一括ダウンロードができます

ソースコード

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