結果
| 問題 |
No.836 じょうよ
|
| コンテスト | |
| ユーザー |
beet
|
| 提出日時 | 2019-06-14 21:28:52 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 11 ms / 1,000 ms |
| コード長 | 582 bytes |
| コンパイル時間 | 2,012 ms |
| コンパイル使用メモリ | 193,500 KB |
| 最終ジャッジ日時 | 2025-01-07 04:24:01 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 41 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using Int = long long;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}
struct FastIO{
FastIO(){
cin.tie(0);
ios::sync_with_stdio(0);
}
}fastio_beet;
//INSERT ABOVE HERE
signed main(){
Int l,r,n;
cin>>l>>r>>n;
auto calc=
[&](Int x,Int y){
Int res=x/n;
if(y!=0&&y<=x%n) res++;
return res;
};
for(Int i=0;i<n;i++)
cout<<calc(r,i)-calc(l-1,i)<<"\n";
cout<<flush;
return 0;
}
beet