結果
| 問題 | No.740 幻の木 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-01-07 13:35:00 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| コード長 | 306 bytes |
| 記録 | |
| コンパイル時間 | 460 ms |
| コンパイル使用メモリ | 55,648 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-24 00:25:55 |
| 合計ジャッジ時間 | 1,046 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 |
ソースコード
#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-1)N-=M;
N-=M;
if(N <= 0){
cout << i + tm * 12 << endl;
break;
}
}
tm++;
}
}