結果
問題 | No.48 ロボットの操縦 |
ユーザー |
![]() |
提出日時 | 2020-11-16 20:54:51 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 304 bytes |
コンパイル時間 | 2,068 ms |
コンパイル使用メモリ | 191,688 KB |
最終ジャッジ日時 | 2025-01-16 01:13:29 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main(){int x, y, l;cin >> x >> y >> l;int ans = 0;if(x==0){if(y<0)ans += 2;}else{if(y<0)ans += 2; else ans += 1;}x = abs(x);y = abs(y);ans += (x+l-1)/l + (y+l-1)/l;cout << ans << endl;}