結果
問題 |
No.652 E869120 and TimeZone
|
ユーザー |
![]() |
提出日時 | 2018-06-26 04:45:20 |
言語 | Kotlin (2.1.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 448 bytes |
コンパイル時間 | 12,408 ms |
コンパイル使用メモリ | 440,872 KB |
実行使用メモリ | 57,768 KB |
最終ジャッジ日時 | 2024-11-20 16:27:09 |
合計ジャッジ時間 | 26,435 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 21 WA * 9 |
コンパイルメッセージ
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 } } ^
ソースコード
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)) }