結果

問題 No.652 E869120 and TimeZone
ユーザー 💕💖💞💕💖💞
提出日時 2018-06-26 04:45:20
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 448 bytes
コンパイル時間 10,253 ms
コンパイル使用メモリ 442,052 KB
実行使用メモリ 57,812 KB
最終ジャッジ日時 2024-04-30 18:56:23
合計ジャッジ時間 22,602 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 303 ms
57,636 KB
testcase_01 AC 304 ms
57,572 KB
testcase_02 WA -
testcase_03 AC 302 ms
57,704 KB
testcase_04 AC 298 ms
57,688 KB
testcase_05 AC 305 ms
57,724 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 300 ms
57,640 KB
testcase_09 AC 302 ms
57,668 KB
testcase_10 AC 300 ms
57,700 KB
testcase_11 AC 306 ms
57,768 KB
testcase_12 AC 304 ms
57,568 KB
testcase_13 WA -
testcase_14 AC 309 ms
57,548 KB
testcase_15 AC 307 ms
57,572 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 305 ms
57,672 KB
testcase_19 AC 302 ms
57,680 KB
testcase_20 AC 309 ms
57,700 KB
testcase_21 WA -
testcase_22 AC 304 ms
57,760 KB
testcase_23 AC 332 ms
57,608 KB
testcase_24 WA -
testcase_25 AC 310 ms
57,600 KB
testcase_26 AC 310 ms
57,660 KB
testcase_27 AC 307 ms
57,680 KB
testcase_28 AC 349 ms
57,604 KB
testcase_29 WA -
testcase_30 AC 300 ms
57,576 KB
testcase_31 AC 301 ms
57,644 KB
testcase_32 AC 303 ms
57,564 KB
testcase_33 AC 311 ms
57,752 KB
testcase_34 AC 308 ms
57,696 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args:Array<String>) {
         ^
Main.kt:14:27: warning: the expression is unused
  when( m > 0 ) { true -> null; else -> { m += 60; h-=1 } }
                          ^
Main.kt:15:27: warning: the expression is unused
  when( h > 0 ) { true -> null; else -> { h += 24 } }
                          ^

ソースコード

diff #

fun main(args:Array<String>) {
  val (a,b,c) = readLine()!!.split(" ")

  var h = a.toInt()
  var m = b.toInt()
  val delta = c.replace("UTC", "").toDouble() - 9

  h += delta.toInt()
  h = h % 24

  //println(delta)
  m += ((delta - delta.toInt().toDouble())*60).toInt()

  when( m > 0 ) { true -> null; else -> { m += 60; h-=1 } }
  when( h > 0 ) { true -> null; else -> { h += 24 } }

  h += m/60
  m = m%60
  println("%02d:%02d".format(h, m))
}
0