結果
| 問題 | No.51 やる気の問題 |
| コンテスト | |
| ユーザー |
tntan
|
| 提出日時 | 2015-12-15 05:15:34 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 331 bytes |
| 記録 | |
| コンパイル時間 | 462 ms |
| コンパイル使用メモリ | 63,204 KB |
| 最終ジャッジ日時 | 2024-11-14 19:30:47 |
| 合計ジャッジ時間 | 884 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:18:21: error: ‘floor’ was not declared in this scope
18 | k = floor(k);
| ^~~~~
ソースコード
#include<iostream>
#include<string>
#include<fstream>
#include<iomanip>
#include<vector>
#include<cctype>
#include<algorithm>
using namespace std;
static const int MAX_N = 1000005;
int main()
{
double w, d, k;
cin >> w >> d;
while (w > 0)
{
k = w / (d*d);
k = floor(k);
w -= k;
d--;
}
cout << k << endl;
return 0;
}
tntan