結果
問題 |
No.740 幻の木
|
ユーザー |
|
提出日時 | 2019-08-01 02:02:25 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 309 bytes |
コンパイル時間 | 1,867 ms |
コンパイル使用メモリ | 193,200 KB |
最終ジャッジ日時 | 2025-01-07 10:25:01 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 4 WA * 2 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int n, m, p, q; cin>>n>>m>>p>>q; for (int i = 1;; i++) { n -= m; if (p <= i && i < p+q) n -= m; if (n <= 0) { cout << i << endl; break; } } return 0; }