結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
>
|
| 提出日時 | 2014-10-23 22:36:20 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 373 bytes |
| コンパイル時間 | 695 ms |
| コンパイル使用メモリ | 58,452 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-30 13:05:35 |
| 合計ジャッジ時間 | 1,661 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 WA * 6 |
ソースコード
#include <iostream>
#include <cmath>
using namespace std;
#define ABS(x) ((x < 0) ? -x : x)
int main()
{
int x, y, l, ans = 0;
cin >> x >> y >> l;
ans = ceil( ABS(x) / (double)l) + ceil( ABS(y) / (double)l);
if (x == 0 && y < 0) ans+=2;
if (x != 0 && y >= 0) ans++;
if (x < 0 && y < 0) ans++;
printf("%d\n", ans);
return 0;
}
>