結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
IRXGCGySDjxVBhf
|
| 提出日時 | 2021-11-14 20:46:48 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 752 bytes |
| コンパイル時間 | 1,543 ms |
| コンパイル使用メモリ | 167,268 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-30 05:11:51 |
| 合計ジャッジ時間 | 2,492 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 WA * 1 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main()
{
int X,Y,L;cin>>X>>Y>>L;
int com=0;
if(Y>0)
{
if(Y%L)
{
com+=Y/L+1;
}
else
{
com+=Y/L;
}
}
else if(Y<0)
{
com++;
if(Y%L)
{
com+=-Y/L+1;
}
else
{
com+=-Y/L;
}
}
if(X>0)
{
com++;
if(X%L)
{
com+=X/L+1;
}
else
{
com+=X/L;
}
}
else if(X<0)
{
com++;
if(X%L)
{
com+=-X/L+1;
}
else
{
com+=-X/L;
}
}
cout<<com<<endl;
}
IRXGCGySDjxVBhf