結果
| 問題 |
No.740 幻の木
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2019-01-07 13:34:00 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 304 bytes |
| コンパイル時間 | 437 ms |
| コンパイル使用メモリ | 55,860 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-24 00:25:53 |
| 合計ジャッジ時間 | 1,020 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 4 WA * 2 |
ソースコード
#include <iostream>
using namespace std;
int main(){
int N,M,P,Q;
cin >> N >> M >> P >> Q;
int tm = 0;
while(N > 0){
for(int i = 1; 12 >= i; i++){
if(P <= i && i <= Q+P)N-=M;
N-=M;
if(N <= 0){
cout << i + tm * 12 << endl;
break;
}
}
tm++;
}
}