結果
問題 |
No.48 ロボットの操縦
|
ユーザー |
|
提出日時 | 2020-02-08 16:49:38 |
言語 | Kotlin (2.1.0) |
結果 |
AC
|
実行時間 | 299 ms / 5,000 ms |
コード長 | 407 bytes |
コンパイル時間 | 12,877 ms |
コンパイル使用メモリ | 447,368 KB |
実行使用メモリ | 56,856 KB |
最終ジャッジ日時 | 2024-09-25 08:52:14 |
合計ジャッジ時間 | 21,932 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
コンパイルメッセージ
Main.kt:4:10: warning: parameter 'args' is never used fun main(args: Array<String>) { ^
ソースコード
import kotlin.math.abs import kotlin.math.ceil fun main(args: Array<String>) { p75() } fun p75() { val (x, y, l) = (1..3).map { readLine()!!.toInt() } val answer = ceil(abs(x).toDouble() / l).toInt() + ceil(abs(y).toDouble() / l).toInt() + when (y) { in Int.MIN_VALUE..-1 -> 2 else -> when (x) { 0 -> 0 else -> 1 } } println(answer) }