結果

問題 No.810 割った余りの個数
ユーザー mzkrmzkr
提出日時 2019-05-06 05:40:47
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
MLE  
実行時間 -
コード長 285 bytes
コンパイル時間 478 ms
コンパイル使用メモリ 64,416 KB
実行使用メモリ 821,440 KB
最終ジャッジ日時 2023-09-09 04:08:31
合計ジャッジ時間 20,159 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 513 ms
4,380 KB
testcase_01 AC 513 ms
4,376 KB
testcase_02 AC 512 ms
4,376 KB
testcase_03 AC 512 ms
4,380 KB
testcase_04 AC 512 ms
4,376 KB
testcase_05 AC 512 ms
4,376 KB
testcase_06 AC 512 ms
4,376 KB
testcase_07 AC 513 ms
4,376 KB
testcase_08 AC 515 ms
4,376 KB
testcase_09 AC 513 ms
4,380 KB
testcase_10 AC 512 ms
4,384 KB
testcase_11 AC 513 ms
4,380 KB
testcase_12 AC 513 ms
4,380 KB
testcase_13 AC 513 ms
4,376 KB
testcase_14 AC 514 ms
4,380 KB
testcase_15 AC 513 ms
4,376 KB
testcase_16 AC 511 ms
4,380 KB
testcase_17 AC 513 ms
4,376 KB
testcase_18 AC 513 ms
4,376 KB
testcase_19 AC 513 ms
4,380 KB
testcase_20 AC 1,383 ms
44,356 KB
testcase_21 AC 1,195 ms
151,264 KB
testcase_22 AC 793 ms
7,412 KB
testcase_23 MLE -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

using namespace std;

bool d[1000000000];

int main() {
  int l, r, m;
  cin >> l >> r >> m;
  for (int i = l; i <= r; ++i) {
    d[i % m] |= true;
  }

  int c = 0;
  for (int i = 0; i < 1000000000; ++i) {
    if (d[i]) c++;
  }
  cout << c << endl;
  return 0;
}
0