結果

問題 No.810 割った余りの個数
ユーザー snneko
提出日時 2019-04-12 22:08:13
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 278 bytes
コンパイル時間 1,901 ms
コンパイル使用メモリ 170,696 KB
実行使用メモリ 342,940 KB
最終ジャッジ日時 2024-09-14 19:00:45
合計ジャッジ時間 5,640 ms
ジャッジサーバーID
(参考情報)
judge1 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20 TLE * 1 -- * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main() {
    int L, R, M;
    cin >> L >> R >> M;
    
    set <int> s;
    for (int i = L; i <= R; i++) {
        s.insert(i % M);
        if (s.size() == M) break;
    }
    
    cout << s.size() << endl;
    
    return 0;
}
0