結果

問題 No.810 割った余りの個数
ユーザー albusSamurai
提出日時 2019-04-12 21:47:27
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
MLE  
実行時間 -
コード長 322 bytes
コンパイル時間 1,843 ms
コンパイル使用メモリ 167,192 KB
実行使用メモリ 813,948 KB
最終ジャッジ日時 2024-09-14 17:59:35
合計ジャッジ時間 6,860 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22 MLE * 2 -- * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

// Undone
#include <bits/stdc++.h>
#define REP(i, n) for(int i=0;i<(n);++i)
#define LL long long
using namespace std;

int main(void) {

  int L, R, M;
  cin >> L >> R >> M;
  vector<int> calc(M,0);
  for (int i = L; i <= R; i++) {
    calc[i%M] = 1;
  }
  int ans = 0;
  REP(i,M) ans += calc[i];
  cout << ans << endl;
}
0