結果

問題 No.48 ロボットの操縦
ユーザー Mcpu3
提出日時 2018-06-22 16:43:15
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 214 bytes
コンパイル時間 314 ms
コンパイル使用メモリ 30,080 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-30 18:00:11
合計ジャッジ時間 1,019 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <math.h>

int main(void)
{
	int x,y,l,s=0;
	scanf("%d%d%d",&x,&y,&l);
	if(x!=0)s++;
	if(y<0)s+=2;
	s+=(fabs(x)+fabs(y))/l;
	if((int)(fabs(x)+fabs(y))%l)s++;
	printf("%d",s);
	return 0;
}
0