結果

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

ソースコード

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++;
   }
   cout<<count<<endl;
}
0