結果
| 問題 |
No.1926 Sequence of Remainders
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-06 22:07:28 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 302 ms / 2,000 ms |
| コード長 | 462 bytes |
| コンパイル時間 | 831 ms |
| コンパイル使用メモリ | 83,080 KB |
| 最終ジャッジ日時 | 2025-01-29 03:29:29 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 35 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <deque>
using namespace std;
typedef long long ll;
#define rep(i,n) for (int i=0;i < (int)(n);i++)
void slove(){
int n,m,k;
cin >> n >> m >> k;
k %= m;
if (m-n <= k) cout << 0 << endl;
else cout << k << endl;
return;
}
int main(){
int tt = 1;
cin >> tt;
while(tt--){
slove();
}
//cout << f(10,10) << endl;
return 0;
}