結果

問題 No.810 割った余りの個数
ユーザー minimamu21
提出日時 2020-03-30 19:01:20
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 308 bytes
コンパイル時間 1,439 ms
コンパイル使用メモリ 171,932 KB
実行使用メモリ 409,376 KB
最終ジャッジ日時 2024-06-22 18:07:36
合計ジャッジ時間 5,342 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20 TLE * 1 -- * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for (int i=0; i<(n); ++i)
using namespace std;
using ll=long long;
int main(){
    int l,r,m;
    cin>>l>>r>>m;
    set<int>se;
    for(int i=l; i<=r; ++i){
        se.insert(i%m);
    }
    int ans=0;
    for(auto& x:se){
        ans++;
    }
    cout<<ans<<endl;
}
0