結果
問題 |
No.477 MVP
|
ユーザー |
![]() |
提出日時 | 2018-08-18 14:35:05 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 335 bytes |
コンパイル時間 | 486 ms |
コンパイル使用メモリ | 50,412 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2024-10-15 13:44:26 |
合計ジャッジ時間 | 2,681 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 TLE * 1 -- * 10 |
コンパイルメッセージ
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); | ~~~~~^~~~~~~~~~~~~~~~~
ソースコード
#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/2+2; i++) { if (i > floor((N - i) / K)) { printf("%d", i); return 0; } } return 0; }