結果

問題 No.48 ロボットの操縦
ユーザー むうすむうす
提出日時 2023-01-03 13:02:41
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 280 bytes
コンパイル時間 1,555 ms
コンパイル使用メモリ 165,324 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-27 01:51:06
合計ジャッジ時間 3,756 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
 
int main(){
   int X,Y,L;
   cin>>X>>Y>>L;
   int walk=abs(X)+abs(Y);
   int count=0;
   while(walk>0){
       walk-=L;
       count++;
   }
   if(X!=0){
       count++;
   }
   if(Y<0){
       count+=2;
   }
   cout<<count<<endl;
}
0