結果
問題 |
No.98 円を描こう
|
ユーザー |
|
提出日時 | 2021-04-12 02:35:53 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 384 bytes |
コンパイル時間 | 1,894 ms |
コンパイル使用メモリ | 192,832 KB |
最終ジャッジ日時 | 2025-01-20 16:13:33 |
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 3 |
other | WA * 6 |
ソースコード
#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); } cout << ans << endl; }