結果
| 問題 | No.48 ロボットの操縦 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-12-26 11:18:17 |
| 言語 | C90(gcc15) (gcc 15.2.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 223 bytes |
| 記録 | |
| コンパイル時間 | 140 ms |
| コンパイル使用メモリ | 35,892 KB |
| 最終ジャッジ日時 | 2026-02-23 23:59:40 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
#include<stdio.h>
#define abs(a) ((a)<0?-(a):(a))
int main(){
long x,y,l,s=0;
scanf("%ld%ld%ld",&x,&y,&l);
if(y<0) s+=2;
else if(x!=0) s++;
x=abs(x);
y=abs(y);
s+=(x+l-1)/l+(y+l-1)/l;
printf("%ld\n",s);
return 0;
}