結果
| 問題 |
No.172 UFOを捕まえろ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-03-22 14:04:53 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 190 bytes |
| コンパイル時間 | 106 ms |
| コンパイル使用メモリ | 22,784 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-05 17:37:29 |
| 合計ジャッジ時間 | 856 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%d %d %lf",&x,&y,&r);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
#include <math.h>
#include <stdlib.h>
int main(void){
int x,y;
double r;
scanf("%d %d %lf",&x,&y,&r);
printf("%d\n",(int)(abs(x)+abs(y)+sqrt(2)*r+1));
return 0;
}