結果
| 問題 | No.48 ロボットの操縦 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-03-25 13:19:56 |
| 言語 | Nim (2.2.8) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 594 bytes |
| 記録 | |
| コンパイル時間 | 2,411 ms |
| コンパイル使用メモリ | 66,840 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2026-03-20 00:15:56 |
| 合計ジャッジ時間 | 3,179 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport]
ソースコード
import sequtils, strutils, math
var
x = readLine(stdin).parseInt
y = readLine(stdin).parseInt
l = readLine(stdin).parseInt
proc main():int =
result += int(ceil(x.abs / l) + ceil(y.abs / l))
if x == 0:
if y > 0:
return
elif y < 0:
return result + 2
elif y == 0:
return result + 1
elif x > 0:
if y > 0:
return result + 1
elif y < 0:
return result + 2
elif x < 0:
if y > 0:
return result + 1
elif y < 0:
return result + 2
echo main()