結果
問題 |
No.836 じょうよ
|
ユーザー |
|
提出日時 | 2019-09-01 12:39:54 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 432 bytes |
コンパイル時間 | 563 ms |
コンパイル使用メモリ | 73,036 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-27 21:18:46 |
合計ジャッジ時間 | 3,417 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 26 WA * 10 RE * 5 |
ソースコード
#include <iostream> #include <algorithm> #include <vector> #include <math.h> using namespace std; typedef long long int ll; ll cnt[100010]; int main(){ ll l,r,n; cin >> l >> r >> n; ll left=l/n; ll right=r/n; ll c=0; if(right-left>1)c+=(right-left-1); for(ll i=l;;i++){ if(i%n==0)break; cnt[i%n]++; } for(ll i=r;;i--){ if(i!=r&&i%n==n-1)break; cnt[i%n]++; } for(int i=0;i<n;i++){ cout << cnt[i]+c << endl; } }