結果

問題 No.836 じょうよ
ユーザー michonz4michonz4
提出日時 2020-01-06 22:03:50
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 360 bytes
コンパイル時間 254 ms
コンパイル使用メモリ 28,928 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-23 00:08:14
合計ジャッジ時間 1,891 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13 WA * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main() {
  long long l, r, n;
  scanf("%lld %lld %lld", &l, &r, &n);

  long long front=l+(n%l), back=r-r%n-1, center=(back-front+1)/n;
  if (n==1) center++;

  long long arr[100000]={};
  for (int i=0; i<n; i++) {
    arr[i]+=center;
    if (i<=r%n) arr[i]++;
    if (i>=l) arr[i]++;
    printf(" %lld\n", arr[i]);
  }
  
  return 0;
}
0