結果

問題 No.48 ロボットの操縦
ユーザー kkslucy1
提出日時 2018-03-08 02:57:21
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 206 bytes
コンパイル時間 1,383 ms
コンパイル使用メモリ 158,940 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-05 07:19:10
合計ジャッジ時間 2,101 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 3 WA * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main(){
 int x,y,l;
 cin>>x>>y>>l;
 int ans=0;
 if(y>=0){
  ans+=y;
 }else{
  ans+=1+abs(y);
 }
 if(x!=0){
  ans+=1+abs(x);
 }
 cout<<ans<<endl;
 return 0;
}
0