結果
| 問題 | 
                            No.1926 Sequence of Remainders
                             | 
                    
| コンテスト | |
| ユーザー | 
                             vwxyz
                         | 
                    
| 提出日時 | 2022-09-06 15:37:00 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 294 ms / 2,000 ms | 
| コード長 | 244 bytes | 
| コンパイル時間 | 122 ms | 
| コンパイル使用メモリ | 12,416 KB | 
| 実行使用メモリ | 11,008 KB | 
| 最終ジャッジ日時 | 2024-11-21 16:49:44 | 
| 合計ジャッジ時間 | 14,792 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 35 | 
ソースコード
from collections import defaultdict
import sys
readline=sys.stdin.readline
write=sys.stdout.write
T=int(readline())
for t in range(T):
    N,M,K=map(int,readline().split())
    if K%M<M-N:
        ans=K%M
    else:
        ans=0
    print(ans)
            
            
            
        
            
vwxyz