結果
問題 | No.48 ロボットの操縦 |
ユーザー |
![]() |
提出日時 | 2016-01-01 20:45:04 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 229 bytes |
コンパイル時間 | 474 ms |
コンパイル使用メモリ | 55,008 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-21 18:31:51 |
合計ジャッジ時間 | 1,298 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
#include<iostream>using namespace std;int main(){int a,b,c,ans=0;cin >> a>>b>>c;if(b<0)ans+=2;else if(a)ans++;if(b<0)b=-b;if(a<0)a=-a;ans+=(a+c-1)/c+(b+c-1)/c;cout<<ans;return 0;}