結果
問題 |
No.48 ロボットの操縦
|
ユーザー |
![]() |
提出日時 | 2021-11-27 23:23:43 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 342 bytes |
コンパイル時間 | 1,565 ms |
コンパイル使用メモリ | 166,436 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-30 14:44:37 |
合計ジャッジ時間 | 2,471 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 17 WA * 8 |
ソースコード
#include <bits/stdc++.h> using namespace std; int func(int a, int l){ if (abs(a)%l == 0) return abs(a/l); else return abs(a/l)+1; } int main(){ string s; long long x, y, l; cin >> x >> y >> l; if (x == 0 or y == 0) cout << func(x,l)+func(y,l) << endl; else cout << func(x,l)+func(y,l)+1 << endl ; return 0; }