結果
| 問題 |
No.740 幻の木
|
| コンテスト | |
| ユーザー |
yuasa0000
|
| 提出日時 | 2019-03-25 14:28:03 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 389 bytes |
| コンパイル時間 | 537 ms |
| コンパイル使用メモリ | 56,000 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-08 03:16:33 |
| 合計ジャッジ時間 | 2,229 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 6 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main() {
int N, M, P, Q;
cin >> N >> M >> P >> Q;
int month = 0;
int i = 1;
while (true) {
if (i >= P && i <= P + (Q - 1)) {
N -= M*2;
month++;
cout << N << endl;
}
else {
N -= M;
cout << N << endl;
month++;
}
i++;
if(i == 13)i = 1;
if(N <= 0)break;
}
cout << month << endl;
return 0;
}
yuasa0000