結果
問題 |
No.48 ロボットの操縦
|
ユーザー |
![]() |
提出日時 | 2020-03-27 16:57:33 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 378 bytes |
コンパイル時間 | 1,391 ms |
コンパイル使用メモリ | 160,032 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2025-01-02 08:46:57 |
合計ジャッジ時間 | 2,342 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 WA * 6 |
ソースコード
#include <bits/stdc++.h> #define rep(i,n)for(long long i=0;i<(n);i++) using namespace std; typedef unsigned long long ull; typedef long long ll; const ll INF=1e18; const int MOD=1e9+7; const double pi=acos(-1); int main(){ ll x,y,l; cin >> x >> y >> l; ll ans=0; if(y<0)ans+=2; ans+=(abs(y)+l-1)/l; if(x!=0)ans++; ans+=(abs(x)+l-1)/l; cout << ans << endl; }