結果
| 問題 | No.48 ロボットの操縦 |
| コンテスト | |
| ユーザー |
lrf141
|
| 提出日時 | 2016-12-03 09:22:40 |
| 言語 | C90 (gcc 15.2.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 344 bytes |
| 記録 | |
| コンパイル時間 | 187 ms |
| コンパイル使用メモリ | 38,552 KB |
| 最終ジャッジ日時 | 2026-02-23 23:08:56 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 WA * 6 |
ソースコード
#include<stdio.h>
int main(){
int x,y,l;
scanf("%d",&x);scanf("%d",&y);scanf("%d",&l);
int res = 0;
if(y < 0)
res += 2;
if(x != 0)
res += 1;
x = (x < 0)?(-1)*x:x;
y = (y < 0)?(-1)*y:y;
res += (x%l == 0)?x/l:(x/l)+1;
res += (y%l == 0)?y/l:(y/l)+1;
printf("%d\n",res);
return 0;
}
lrf141