結果
| 問題 |
No.172 UFOを捕まえろ
|
| コンテスト | |
| ユーザー |
akakimidori
|
| 提出日時 | 2017-06-21 23:57:00 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 245 bytes |
| コンパイル時間 | 336 ms |
| コンパイル使用メモリ | 22,784 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-02 11:54:35 |
| 合計ジャッジ時間 | 1,161 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
コンパイルメッセージ
main.c: In function ‘run’:
main.c:7:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%d%d%d",&x,&y,&r);
| ^~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
void run(void){
int x,y,r;
scanf("%d%d%d",&x,&y,&r);
x=abs(x);
y=abs(y);
int ans=x+y+1+(int)(sqrt(2)*r);
printf("%d\n",ans);
return;
}
int main(void){
run();
return 0;
}
akakimidori