結果
問題 |
No.172 UFOを捕まえろ
|
ユーザー |
|
提出日時 | 2018-03-28 23:18:46 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 201 bytes |
コンパイル時間 | 274 ms |
コンパイル使用メモリ | 30,464 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-25 13:54:08 |
合計ジャッジ時間 | 1,000 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 5 WA * 16 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:6:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d %d %d",&x,&y,&r); | ~~~~~^~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <stdlib.h> #include <math.h> int main() { int x,y,r; scanf("%d %d %d",&x,&y,&r); double l = fabs(x+y+sqrt(2)*r); printf("%d\n",(int)l+(l>(int)l?1:0)); return 0; }