結果
| 問題 |
No.98 円を描こう
|
| コンテスト | |
| ユーザー |
prog470
|
| 提出日時 | 2016-09-11 10:46:17 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 465 bytes |
| コンパイル時間 | 445 ms |
| コンパイル使用メモリ | 63,104 KB |
| 最終ジャッジ日時 | 2024-11-14 19:49:21 |
| 合計ジャッジ時間 | 859 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:33:23: error: ‘sqrt’ was not declared in this scope
33 | cout << (int)(sqrt(r2) * 2 + 1) << endl;
| ^~~~
ソースコード
#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;
*/
cout << (int)(sqrt(r2) * 2 + 1) << endl;
return 0;
}
prog470