結果
| 問題 | No.415 ぴょん |
| コンテスト | |
| ユーザー |
hiyokko2
|
| 提出日時 | 2016-08-26 23:20:18 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 385 bytes |
| 記録 | |
| コンパイル時間 | 960 ms |
| コンパイル使用メモリ | 173,988 KB |
| 実行使用メモリ | 7,976 KB |
| 最終ジャッジ日時 | 2026-05-08 16:01:45 |
| 合計ジャッジ時間 | 2,969 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 WA * 16 |
ソースコード
#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 + 1) {
now += D;
cnt++;
}
if (now > N + 1) {
if ((now % N - 1) % D == 0)
{
cout << --cnt << endl;
} else {
cout << N - 1 << endl;
}
} else {
cout << --cnt << endl;
}
}
hiyokko2