結果
| 問題 | No.48 ロボットの操縦 |
| コンテスト | |
| ユーザー |
lrf141
|
| 提出日時 | 2016-12-03 23:25:45 |
| 言語 | C90(gcc15) (gcc 15.2.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 388 bytes |
| 記録 | |
| コンパイル時間 | 184 ms |
| コンパイル使用メモリ | 39,456 KB |
| 最終ジャッジ日時 | 2026-02-23 23:13:37 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
#include<stdio.h>
#include<math.h>
int main(){
long int x,y,l;
scanf("%ld %ld %ld",&x,&y,&l);
int res = 0;
if((0 < x && 0 < y) || (x < 0 && 0 <= y)){
res++;
}
else if((0 < x && y <= 0) || (x <= 0 && y < 0)){
res+=2;
}
res += (int)ceil(fabs((double)x)/l);
res += (int)ceil(fabs((double)y)/l);
printf("%d\n",res);
return 0;
}
lrf141