結果
| 問題 | 
                            No.1926 Sequence of Remainders
                             | 
                    
| コンテスト | |
| ユーザー | 
                             monnu
                         | 
                    
| 提出日時 | 2022-05-06 21:27:52 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 260 ms / 2,000 ms | 
| コード長 | 409 bytes | 
| コンパイル時間 | 3,641 ms | 
| コンパイル使用メモリ | 228,444 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-05 22:34:04 | 
| 合計ジャッジ時間 | 15,065 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 35 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
using ll=long long;
using Graph=vector<vector<int>>;
#define INF 1000000000
#define MOD 998244353
#define MAX 200000
void solve(){
  int N,M,K;
  cin>>N>>M>>K;
  int a=K%M;
  if(a<M-N){
    cout<<a<<'\n';
  }else{
    cout<<0<<'\n';
  }
}
int main(){
  int T;
  cin>>T;
  for(int i=0;i<T;i++){
    solve();
  }
}
            
            
            
        
            
monnu