結果

問題 No.415 ぴょん
ユーザー hiyokko2
提出日時 2016-08-26 23:07:44
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 305 bytes
コンパイル時間 1,708 ms
コンパイル使用メモリ 157,096 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-08 09:44:42
合計ジャッジ時間 3,501 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
//#define int long long
using namespace std;

int N, D;

signed main()
{
	cin >> N >> D;

	int now = 1, cnt = 0;
	while (now <= N) {
		now += D;
		cnt++;
	}

	if (now > N + 1) {
		cout << N - 1 << endl;
	} else {
		cout << --cnt << endl;
	}
}
0