結果
| 問題 | No.172 UFOを捕まえろ |
| コンテスト | |
| ユーザー |
カルロス
|
| 提出日時 | 2015-09-14 13:04:32 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 183 bytes |
| 記録 | |
| コンパイル時間 | 137 ms |
| コンパイル使用メモリ | 30,152 KB |
| 最終ジャッジ日時 | 2026-02-23 19:27:37 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%d %d %d", &x, &y, &r);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <math.h>
int main(void){
int x, y, r;
scanf("%d %d %d", &x, &y, &r);
printf("%.0lf\n", ceil(abs(x)+abs(y)+sqrt(2)*(double)r));
return 0;
}
カルロス