結果

問題 No.1926 Sequence of Remainders
ユーザー a01sa01to
提出日時 2024-03-14 00:18:31
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 267 ms / 2,000 ms
コード長 476 bytes
コンパイル時間 2,962 ms
コンパイル使用メモリ 244,604 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-09-29 23:39:12
合計ジャッジ時間 16,673 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 35
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
  #include "settings/debug.cpp"
  #define _GLIBCXX_DEBUG
#else
  #define Debug(...) void(0)
#endif
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using ull = unsigned long long;

int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, m, k;
    cin >> n >> m >> k;
    k %= m;
    if (m - n <= k) {
      cout << 0 << endl;
    }
    else {
      cout << k << endl;
    }
  }
  return 0;
}
0