結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-03-14 03:20:22 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 282 bytes |
| コンパイル時間 | 1,929 ms |
| コンパイル使用メモリ | 191,656 KB |
| 最終ジャッジ日時 | 2025-01-09 06:43:53 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 WA * 9 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
int main(){
int x,y,l; cin>>x>>y>>l;
int ans=0;
if(y>=0) ans+=(y+l-1)/l;
else ans+=(-y+l-1)/l+2;
if(x>=0) ans+=(x+l-1)/l+1;
else ans+=(-x+l-1)/l+1;
cout<<ans<<'\n';
return 0;
}