結果

問題 No.836 じょうよ
ユーザー dama_math
提出日時 2019-06-14 21:41:32
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 124 ms / 1,000 ms
コード長 747 bytes
コンパイル時間 1,648 ms
コンパイル使用メモリ 165,460 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-09 00:43:03
合計ジャッジ時間 4,180 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 41
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define FI first
#define SE second
#define PB push_back
#define ll long long
#define FOR(i,a,b) for(int i=a;i<b;++i)
#define ROF(i,a,b) for(int i=b-1;i>=a;--i)
#define YES(i) cout<<(i?"YES":"NO")<<endl
#define Yes(i) cout<<(i?"Yes":"No")<<endl
#define co(i) cout<<(i)<<endl
#define fcout cout<<fixed<<setprecision(10)
#define uni(i) i.erase(unique(i.begin(), i.end()), i.end());
#define all(i) i.begin(),i.end()
#define pint pair<int, int>
#define vint vector<int>
using namespace std;

const int INF=1e9+7;
const ll LINF=1e18;
const int MOD=1e9+7;
//const int MOD=998244353;

int main(){
	int n; ll l,r;
	cin>>l>>r>>n;
	l--;
	FOR(i,0,n){
		ll ans=0;
		ans+=(r+(n-i)%n)/n;
		ans-=(l+(n-i)%n)/n;
		co(ans);
	}
	return 0;
}
0