結果

問題 No.48 ロボットの操縦
ユーザー kikage
提出日時 2020-03-08 00:57:33
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 260 bytes
コンパイル時間 398 ms
コンパイル使用メモリ 55,732 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-15 15:11:58
合計ジャッジ時間 1,283 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
int main(){
    int X,Y,L,cnt=0;
    cin >> X >> Y >> L;
    if(Y>=0 && X!=0)cnt+=1;
    if(Y<0 && X!=0)cnt+=2;
    if(Y<0 && X==0)cnt+=3;
    cnt+=(abs(X)+L-1)/L+(abs(Y)+L-1)/L;
    cout << cnt << endl;
    return 0;
}
0