結果

問題 No.48 ロボットの操縦
ユーザー TSaito
提出日時 2022-06-12 03:43:31
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 229 bytes
コンパイル時間 581 ms
コンパイル使用メモリ 63,108 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-22 14:03:25
合計ジャッジ時間 1,283 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4 WA * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

using namespace std;
int main()
{
	int X,Y,L;
	cin >> X >> Y >> L;
	int op=0;
	if(X<0){
		op++;
		X *= -1;
	}
	if(Y<0){
		op++;
		Y *= -1;
	}
	op += X / L + X % L;
	op += Y / L + Y % L;
	cout << op << endl;
}
0