結果
問題 |
No.98 円を描こう
|
ユーザー |
|
提出日時 | 2021-04-12 02:37:42 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 393 bytes |
コンパイル時間 | 1,924 ms |
コンパイル使用メモリ | 193,984 KB |
最終ジャッジ日時 | 2025-01-20 16:13:47 |
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 3 |
other | AC * 3 WA * 3 |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll = long long; bool is_integer(double x){ return floor(x) == x; } int main(){ double xp,yp; cin >> xp >> yp; int ans = 0; double dist = sqrt(xp*xp + yp*yp); if(is_integer(dist)){ ans = (ll)dist + 1; }else{ ans = (ll)ceil(dist); } ans *= 2; cout << ans << endl; }