結果
| 問題 |
No.98 円を描こう
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-02-04 20:52:57 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 466 bytes |
| コンパイル時間 | 846 ms |
| コンパイル使用メモリ | 91,392 KB |
| 最終ジャッジ日時 | 2025-01-08 22:06:55 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 4 |
| other | WA * 6 |
ソースコード
#include <iostream>
#include <iomanip>
#include <cmath>
int main()
{
int x, y;std::cin >> x >> y;
x = std::abs(x), y=std::abs(y);
const int R = x*x+y*y;
int min = 1<<30;
for(int i =0; i <= 2*x; i++){
for(int j =0; j <=2*y; j++){
const int r = i*i+j*j;
if(r>R){min = std::min(min, r);}
}
}
std::cout << std::fixed << std::setprecision(15)<< std::sqrt((long double)(min))<< std::endl;
return 0;
}