結果
| 問題 |
No.98 円を描こう
|
| コンテスト | |
| ユーザー |
prog470
|
| 提出日時 | 2016-09-11 10:42:42 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 414 bytes |
| コンパイル時間 | 450 ms |
| コンパイル使用メモリ | 63,200 KB |
| 最終ジャッジ日時 | 2024-11-14 19:49:22 |
| 合計ジャッジ時間 | 822 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:25:29: error: ‘sqrt’ was not declared in this scope
25 | if (r > 2 * sqrt(r2)) break;
| ^~~~
ソースコード
#include<stdio.h>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <string>
#include <stdio.h>
using namespace std;
int main() {
double xp, yp;
cin >> xp >> yp;
double r2 = xp*xp + yp*yp;
int r = 0;
for (;;) {
if (r > 2 * sqrt(r2)) break;
r++;
}
cout << r << endl;
return 0;
}
prog470