結果
| 問題 | No.48 ロボットの操縦 |
| コンテスト | |
| ユーザー |
Elizack
|
| 提出日時 | 2020-02-05 18:51:36 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 576 bytes |
| 記録 | |
| コンパイル時間 | 268 ms |
| コンパイル使用メモリ | 73,484 KB |
| 実行使用メモリ | 9,804 KB |
| 最終ジャッジ日時 | 2026-09-02 17:24:13 |
| 合計ジャッジ時間 | 2,735 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 WA * 1 |
ソースコード
#include <iostream>
using namespace std;
int main(){
int x,y,l;
cin >> x >> y >> l;
int ans = 0;
if(x > 0){
if(y < 0){
ans += 2;
}else{
ans++;
}
}else if(x < 0){
if(y < 0){
ans += 2;
}else{
ans++;
}
}
if(y > 0){
while(y > 0){
y -= l;
ans++;
}
}else if(y < 0){
while(y < 0){
y += l;
ans++;
}
}
if(x > 0){
while(x > 0){
x -= l;
ans++;
}
}else if(x < 0){
while(x < 0){
x += l;
ans++;
}
}
cout << ans << endl;
return 0;
}
Elizack