結果

問題 No.810 割った余りの個数
ユーザー autumn_314
提出日時 2019-04-12 21:33:37
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
TLE  
実行時間 -
コード長 419 bytes
コンパイル時間 562 ms
コンパイル使用メモリ 73,048 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-14 17:25:07
合計ジャッジ時間 10,865 ms
ジャッジサーバーID
(参考情報)
judge6 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29 TLE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <string>
#include <iostream>
#include <iomanip>
#include <map>
#include <algorithm>
#include <vector>
#include <math.h>
#define MOD (long long)1000000007
using namespace std;

int main(void){
    int l,r,m;
    cin >> l >> r >> m;
    int check=-1,ans=1;
    check=l%m;
    for(int i=l+1; i<=r; i++){
        if(i%m==check)break;
        ans++;
    }
    cout << ans << endl;
    return 0;
}
0