結果
問題 | No.98 円を描こう |
ユーザー |
|
提出日時 | 2018-06-07 22:30:12 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 266 bytes |
コンパイル時間 | 646 ms |
コンパイル使用メモリ | 66,772 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-30 10:35:17 |
合計ジャッジ時間 | 1,154 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 6 |
ソースコード
#include <iostream> #include <math.h> using namespace std; int main(int argc, char* argv[]) { int X,Y; cin>>X>>Y; double R2=(double)(X*X+Y*Y); double R=sqrt(R2); int D; if (R==(int)R){ D=(int)(R+R)+1; }else{ D=(int)(R+R)+1; } cout<<D<<endl; return 0; }