結果

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

ソースコード

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&&x==0)s+=2;
	else if(y<0)s++;
	s+=(fabs(x)+fabs(y))/l;
	if((int)(fabs(x)+fabs(y))%l)s++;
	printf("%d",s);
	return 0;
}
0