結果
問題 | No.836 じょうよ |
ユーザー |
![]() |
提出日時 | 2019-06-14 22:20:53 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 127 ms / 1,000 ms |
コード長 | 535 bytes |
コンパイル時間 | 1,553 ms |
コンパイル使用メモリ | 166,164 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-14 06:37:38 |
合計ジャッジ時間 | 4,023 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 41 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define all(x) (x).begin(),(x).end() const int mod=1000000007; int main(){ ll L,R,N;cin>>L>>R>>N; L--; for(ll i=0;i<N;i++){ if(R%N>=i&&i){ if(L%N>=i&&i){ cout<<R/N-L/N<<endl; }else{ cout<<R/N-L/N+1<<endl; } }else{ if(L%N>=i&&i){ cout<<R/N-L/N-1<<endl; }else{ cout<<R/N-L/N<<endl; } } } }