結果

問題 No.1926 Sequence of Remainders
ユーザー soragsorag
提出日時 2022-08-21 16:31:09
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
MLE  
実行時間 -
コード長 1,013 bytes
コンパイル時間 1,222 ms
コンパイル使用メモリ 115,464 KB
実行使用メモリ 813,444 KB
最終ジャッジ日時 2024-04-18 13:01:47
合計ジャッジ時間 6,116 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 174 ms
405,488 KB
testcase_01 AC 189 ms
6,944 KB
testcase_02 AC 180 ms
6,944 KB
testcase_03 AC 173 ms
6,940 KB
testcase_04 AC 179 ms
6,940 KB
testcase_05 AC 172 ms
6,944 KB
testcase_06 MLE -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include<utility>
#include <vector>
#include <map>
#include<string>
#include<queue>
#include<math.h>
#define pb push_back
#define all(x) begin(x),end(x)
#define gall(x) begin(x),end(x),greater<>()
#define ll long long
#define P pair<int,int>
#define lP pair<ll,ll>
#include <iostream>
#include <vector>
using namespace std;
vector<pair<long long, long long> > prime_factorize(long long N) {
vector<pair<long long, long long> > res;
for (long long p = 2; p * p <= N; ++p) {
        if (N % p != 0) {
            continue;
        }
        int e = 0;
        while (N % p == 0) {
            ++e;
            N /= p;
        }
        res.emplace_back(p, e);
    }
    if (N != 1) {
        res.emplace_back(N, 1);
    }
    return res;
}
using namespace std;
int main() {
    ll t;
    cin>>t;
    for(int i=0;i<t;i++){
        ll n,m,k;
        cin>>n>>m>>k;
        vector<ll> a(n);
        a[0]=k%m;
        if(a[0]<m-n) cout<<a[0]<<endl;
        else cout<<0<<endl;
    }
    return 0;
}
0