結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
chami
|
| 提出日時 | 2024-03-07 03:43:56 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 357 bytes |
| コンパイル時間 | 2,088 ms |
| コンパイル使用メモリ | 193,372 KB |
| 最終ジャッジ日時 | 2025-02-20 01:31:15 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 WA * 8 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int x,y,l,ans=0;
cin>>x>>y>>l;
x=abs(x);
y=abs(y);
if(x%l==0)
ans+=x/l;
if(y%l==0)
ans+=y/l;
if(y%l!=0){
ans+=y/l+1;
}
if(x%l!=0){
ans+=x/l+1;
}
if(x==0 || y==0)
cout<<ans<<endl;
else cout<<ans+1<<endl;
}
chami