結果
| 問題 | No.172 UFOを捕まえろ |
| コンテスト | |
| ユーザー |
suppy193
|
| 提出日時 | 2015-05-28 10:56:38 |
| 言語 | C90 (gcc 12.4.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 191 bytes |
| 記録 | |
| コンパイル時間 | 104 ms |
| コンパイル使用メモリ | 29,992 KB |
| 最終ジャッジ日時 | 2026-02-23 18:30:39 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 WA * 14 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: 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("%d\n", (int)((sqrt(y * y * 2) + r) / sqrt(2) * 2 + abs(x - y) + 1));
return 0;
}
suppy193