結果
問題 |
No.836 じょうよ
|
ユーザー |
![]() |
提出日時 | 2019-06-15 09:51:07 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 615 bytes |
コンパイル時間 | 1,210 ms |
コンパイル使用メモリ | 165,896 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-17 14:08:15 |
合計ジャッジ時間 | 3,258 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 40 WA * 1 |
ソースコード
#include <bits/stdc++.h> #define rep(i,n) for(int i = 0; i < n; ++i) #define all(x) (x).begin(), (x).end() using namespace std; const int INF = 1145141919, MOD = 1e9 + 7; const int64_t LINF = 8931145141919364364, LMOD = 998244353; // const int dx[] = {1, 0, -1, 0, 1, 1, -1, -1}; // const int dy[] = {0, -1, 0, 1, 1, -1, -1, 1}; int main() { int64_t l,r,n; cin>>l>>r>>n; for(int64_t i=0;i<n;i++){ int64_t sum=r/n-(l-1)/n; if(i==0){ cout<<sum<<endl; continue; } if(l%n<=i) sum++; if(r%n<i) sum--; cout<<sum<<endl; } return 0; }