結果
問題 | No.48 ロボットの操縦 |
ユーザー |
![]() |
提出日時 | 2015-12-26 22:55:35 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 711 ms / 5,000 ms |
コード長 | 308 bytes |
コンパイル時間 | 1,174 ms |
コンパイル使用メモリ | 157,784 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-21 18:31:41 |
合計ジャッジ時間 | 2,607 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ long long int x,y,l; cin >> x >> y >> l; int count = 0; if(y < 0) count += 2; else if(x != 0) count++; x = abs(x); y = abs(y); while(x > 0){ x -= l; count++; } while(y > 0){ y -= l; count++; } cout << count << endl; return 0; }