結果

問題 No.836 じょうよ
ユーザー yicode
提出日時 2023-06-13 15:51:46
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 675 bytes
コンパイル時間 1,740 ms
コンパイル使用メモリ 167,432 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-22 01:02:28
合計ジャッジ時間 3,955 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 40 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
long long primeNumber(long long x) {
  bool fire = true;
  for(int i = 2; i <= sqrt(x); i++) {
    if(x % i == 0) {
      fire = false;
    }
  }
  return fire;
}
int main() {
  long long L,R,N; cin >> L >> R >> N;
  long long X = R / N;
  long long Y = L / N;
  long long XY = X - Y;
  long long A = ((R) - XY) / (N - 1);
  long long x = ((R) - XY) % (N - 1);
  if(XY == 0) {
    cout << 1 << endl;
    return 0;
  }
  cout << XY << endl;
  for(int i = 0; i < (N - 1 - x); i++) {
    cout << A << endl;
  }
  for(int i = 0; i < x; i++) {
    cout << A - 1 << endl;
  }
}
0