結果
| 問題 |
No.98 円を描こう
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-10-25 17:10:52 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 501 bytes |
| コンパイル時間 | 504 ms |
| コンパイル使用メモリ | 54,948 KB |
| 最終ジャッジ日時 | 2024-11-14 19:21:30 |
| 合計ジャッジ時間 | 975 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:24:16: error: ‘hypot’ was not declared in this scope
24 | rep = (int)(hypot(a,b)*2);
| ^~~~~
ソースコード
#include <iostream>
#include <algorithm>
#include <string>
#include <cstring>
#include <stack>
using namespace std;
#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
#define SQR(X) ((X)*(X))
typedef long long ll;
typedef unsigned long long ull;
typedef long double lb;
/* ここからが本編 */
int main(void)
{
int i,j;
int n;
double a,b;
int rep;
cin >> a >> b;
rep = (int)(hypot(a,b)*2);
if(rep <= hypot(a,b)*2 ) rep++;
cout << rep << endl;
return 0;
}