結果

問題 No.1926 Sequence of Remainders
ユーザー forest3
提出日時 2022-08-13 20:16:22
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 264 ms / 2,000 ms
コード長 230 bytes
コンパイル時間 1,711 ms
コンパイル使用メモリ 165,580 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-25 00:20:25
合計ジャッジ時間 15,463 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 35
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main()
{
	int T;
	cin >> T;

	for( int i = 0; i < T; i++ ) {
		int N, M, K;
		cin >> N >> M >> K;
		int a = K % M;
		int d = M - a;
		if( d <= N ) a = 0;
		cout << a << endl;
	}
}
0