結果
問題 | No.164 ちっちゃくないよ!! |
ユーザー | javy |
提出日時 | 2015-11-28 10:38:56 |
言語 | Kotlin (1.9.23) |
結果 |
AC
|
実行時間 | 305 ms / 2,000 ms |
コード長 | 1,798 bytes |
コンパイル時間 | 13,912 ms |
コンパイル使用メモリ | 452,964 KB |
実行使用メモリ | 57,148 KB |
最終ジャッジ日時 | 2024-04-30 11:30:29 |
合計ジャッジ時間 | 15,268 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 259 ms
56,644 KB |
testcase_01 | AC | 270 ms
56,896 KB |
testcase_02 | AC | 259 ms
56,604 KB |
testcase_03 | AC | 255 ms
56,740 KB |
testcase_04 | AC | 251 ms
56,684 KB |
testcase_05 | AC | 289 ms
57,100 KB |
testcase_06 | AC | 303 ms
57,092 KB |
testcase_07 | AC | 302 ms
57,140 KB |
testcase_08 | AC | 299 ms
56,964 KB |
testcase_09 | AC | 305 ms
57,148 KB |
testcase_10 | AC | 263 ms
56,720 KB |
コンパイルメッセージ
Main.kt:6:10: warning: parameter 'args' is never used fun main(args: Array<String>) { ^
ソースコード
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 } fun readLineDouble() : Double { val str = readLine() as String return str.toDouble() } fun calcNsinsu(str : String) : Int { val strList = "ZYXWVUTSRQPONMLKJIHGFEDCBA9876543210" for ((i, ch) in strList.withIndex()) { if (str.indexOf(ch) != -1) { return (36-i) } } return -1 } fun calcNum (str: String , shinsu : Int) : Long { val strList = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" var ret : Long = 0 for (ch in str) { ret *= shinsu ret += strList.indexOf(ch) } return ret } val num = readLineInt() var minValue = Long.MAX_VALUE for (i in 1..num) { val tmpS = readLine() as String val tmp = calcNum(tmpS, calcNsinsu(tmpS)) if (minValue > tmp) { minValue = tmp } } println(minValue) }