結果

問題 No.296 n度寝
ユーザー javyjavy
提出日時 2015-11-13 02:01:39
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 333 ms / 1,000 ms
コード長 1,214 bytes
コンパイル時間 11,739 ms
コンパイル使用メモリ 437,232 KB
実行使用メモリ 51,920 KB
最終ジャッジ日時 2024-04-30 07:09:48
合計ジャッジ時間 18,088 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 311 ms
51,580 KB
testcase_01 AC 314 ms
51,848 KB
testcase_02 AC 317 ms
51,920 KB
testcase_03 AC 333 ms
51,668 KB
testcase_04 AC 312 ms
51,536 KB
testcase_05 AC 315 ms
51,632 KB
testcase_06 AC 311 ms
51,840 KB
testcase_07 AC 316 ms
51,856 KB
testcase_08 AC 326 ms
51,552 KB
testcase_09 AC 314 ms
51,804 KB
testcase_10 AC 318 ms
51,576 KB
testcase_11 AC 319 ms
51,764 KB
testcase_12 AC 313 ms
51,612 KB
testcase_13 AC 313 ms
51,868 KB
testcase_14 AC 319 ms
51,860 KB
testcase_15 AC 315 ms
51,768 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:6:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

package Yukicoder

/**
 * Created by hichikawa on 2015/11/12.
 */
fun main(args: Array<String>) {
    fun readLineLongArray(): List<Long> {
        val str = readLine() as String
        val arrStr = str.split(" ")
        val ret = arrStr.map { it.toLong() }
        return ret
    }

    fun readLineLong(): Long {
        val str = readLine() as String
        return str.toLong()
    }

    fun readLineInt(): Int {
        val str = readLine() as String
        return str.toInt()
    }

    fun readLineIntArray() : List<Int> {
        val str = readLine() as String
        val arrStr = str.split(" ")
        val ret = arrStr.map { it.toInt() }
        return ret
    }

    fun readLineDoubleArray(): List<Double> {
        val str = readLine() as String
        val arrStr = str.split(" ")
        val ret = arrStr.map { it.toDouble() }
        return ret
    }

    val inputInt = readLineIntArray()
    val leftTime = (inputInt[0]-1) * inputInt[3] % 1440
    val ansMiniteWithOver = inputInt[2] + leftTime
    val ansMiniteThinkOver = ansMiniteWithOver % 60
    val kuriHour = ansMiniteWithOver / 60
    val ansTime = (inputInt[1] + kuriHour) % 24
    println(ansTime)
    println(ansMiniteThinkOver)
}
0