結果

問題 No.98 円を描こう
ユーザー stone_725
提出日時 2015-09-05 18:14:55
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 183 bytes
コンパイル時間 337 ms
コンパイル使用メモリ 31,616 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-19 03:52:37
合計ジャッジ時間 898 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 3 WA * 3
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:8:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |   scanf("%d %d", &x, &y);
      |   ~~~~~^~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <cstdio>
#include <cmath>

using namespace std;

int main(){
  int x, y;
  scanf("%d %d", &x, &y);
  printf("%d\n", (int)(floor(sqrt(x * x + y * y))) * 2 + 1);
  return 0;
}
0