結果

問題 No.98 円を描こう
ユーザー prog470prog470
提出日時 2016-09-11 10:42:42
言語 C++11
(gcc 11.4.0)
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 414 bytes
コンパイル時間 479 ms
コンパイル使用メモリ 63,308 KB
最終ジャッジ日時 2024-04-27 02:22:08
合計ジャッジ時間 802 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、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;
      |                             ^~~~

ソースコード

diff #

#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;
}
0