結果

問題 No.172 UFOを捕まえろ
ユーザー ninhydrin_
提出日時 2015-04-02 15:28:49
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 179 bytes
コンパイル時間 267 ms
コンパイル使用メモリ 22,912 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-15 14:03:28
合計ジャッジ時間 922 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |   scanf("%d%d%d",&x,&y,&r);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h> 
#include<stdlib.h> 
#include<math.h> 

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