結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-01-18 21:14:54 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 353 bytes |
| コンパイル時間 | 863 ms |
| コンパイル使用メモリ | 60,420 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-23 01:19:15 |
| 合計ジャッジ時間 | 1,742 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 WA * 1 |
ソースコード
#include <iostream>
#include <math.h>
#include <stdlib.h>
int main()
{
int X; std::cin >> X;
int Y; std::cin >> Y;
int L; std::cin >> L;
int ans = 0;
ans += ceil((double)abs(X)/L);
ans += ceil((double)abs(Y)/L);
if(X == 0)
{
if(Y < 0) ans += 2;
}
else
{
if(Y > 0) ans++;
else ans += 2;
}
std::cout << ans << std::endl;
return 0;
}