結果

問題 No.477 MVP
ユーザー Imperi_NightImperi_Night
提出日時 2018-08-18 14:33:12
言語 C++11
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 331 bytes
コンパイル時間 381 ms
コンパイル使用メモリ 50,992 KB
実行使用メモリ 13,880 KB
最終ジャッジ日時 2024-04-23 13:40:41
合計ジャッジ時間 2,808 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
8,224 KB
testcase_01 TLE -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:13:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   13 |         scanf("%u %u", &N, &K);
      |         ~~~~~^~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <cstdio>
#include <vector>
#include <map>
#include <algorithm>
#include <cmath>

#define rep(i,N) for(int (i)=0;(i)<(N);(i)++)

using namespace std;

int main(){
	unsigned int N, K;
	scanf("%u %u", &N, &K);
	for (int i = 1; i < N; i++) {
		if (i > floor((N - i) / K)) {
			printf("%d", i);
			return 0;
		}
	}
	return 0;
}
0