結果

問題 No.172 UFOを捕まえろ
ユーザー 184
提出日時 2015-04-01 11:35:03
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 186 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 30,080 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-03 23:06:29
合計ジャッジ時間 902 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:10:24: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   10 |         int x,y,r;scanf("%d%d%d",&x,&y,&r);
      |                   ~~~~~^~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <cstdio>
#include <cmath>


using namespace std;

//namaega184

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