結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-01-03 13:05:37 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 352 bytes |
| コンパイル時間 | 1,368 ms |
| コンパイル使用メモリ | 165,136 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-27 01:51:15 |
| 合計ジャッジ時間 | 3,471 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 WA * 12 |
ソースコード
#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){
if(X==0){
count+=2;
}
else{
count++;
}
}
cout<<count<<endl;
}