結果
問題 |
No.48 ロボットの操縦
|
ユーザー |
![]() |
提出日時 | 2024-10-30 21:26:26 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 401 bytes |
コンパイル時間 | 1,658 ms |
コンパイル使用メモリ | 166,096 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-30 21:26:30 |
合計ジャッジ時間 | 2,924 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 17 WA * 8 |
ソースコード
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i = 0; i < int(n); i++) using ll = long long; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); int x,y,l; cin >> x >> y >> l; int ans = 0; if(x < 0) x *= -1; ans += (x+l-1)/l; if(y < 0) y *= -1; ans += (y+l-1)/l; if(x != 0 and y != 0) ans++; cout << ans << endl; return 0; }