結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
commy
|
| 提出日時 | 2016-05-09 18:22:44 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 261 bytes |
| コンパイル時間 | 661 ms |
| コンパイル使用メモリ | 65,220 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-21 18:39:10 |
| 合計ジャッジ時間 | 1,224 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
#include<iostream>
#include<cstdlib>
using namespace std;
int main(){
int X,Y,L;
cin>>X>>Y>>L;
int cnt = 0;
cnt += (abs(Y)+L-1)/L;
cnt += (abs(X)+L-1)/L;
if(Y >= 0){
if(X != 0) cnt++;
}else{
cnt += 2;
}
cout<<cnt<<endl;
return 0;
}
commy