結果
問題 | No.1926 Sequence of Remainders |
ユーザー | nyst |
提出日時 | 2022-05-06 21:55:07 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 230 ms / 2,000 ms |
コード長 | 431 bytes |
コンパイル時間 | 630 ms |
コンパイル使用メモリ | 92,484 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-05 23:08:22 |
合計ジャッジ時間 | 10,857 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 35 |
ソースコード
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <map> #include <set> #include <fstream> #include <cmath> #include <stack> #include <queue> #include <iomanip> using namespace std; int main(){ int t;cin>>t; for(int cas=0;cas<t;cas++){ long long n,m,k;cin>>n>>m>>k; long long rem = k % m; if(rem < m-n) cout << rem << endl; else cout << 0 << endl; } }