結果

問題 No.547 未知の言語
ユーザー arbtarbt
提出日時 2017-09-16 21:28:19
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 334 ms / 2,000 ms
コード長 541 bytes
コンパイル時間 12,564 ms
コンパイル使用メモリ 421,896 KB
実行使用メモリ 53,848 KB
最終ジャッジ日時 2023-08-12 20:57:06
合計ジャッジ時間 25,498 ms
ジャッジサーバーID
(参考情報)
judge2 / judge7
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 330 ms
53,440 KB
testcase_01 AC 329 ms
53,688 KB
testcase_02 AC 328 ms
53,848 KB
testcase_03 AC 328 ms
53,400 KB
testcase_04 AC 329 ms
53,712 KB
testcase_05 AC 331 ms
53,612 KB
testcase_06 AC 332 ms
53,576 KB
testcase_07 AC 334 ms
53,476 KB
testcase_08 AC 326 ms
53,376 KB
testcase_09 AC 330 ms
53,400 KB
testcase_10 AC 330 ms
53,668 KB
testcase_11 AC 327 ms
53,716 KB
testcase_12 AC 328 ms
53,700 KB
testcase_13 AC 331 ms
53,496 KB
testcase_14 AC 328 ms
53,508 KB
testcase_15 AC 329 ms
53,644 KB
testcase_16 AC 332 ms
53,396 KB
testcase_17 AC 326 ms
53,464 KB
testcase_18 AC 332 ms
53,596 KB
testcase_19 AC 328 ms
53,512 KB
testcase_20 AC 328 ms
53,568 KB
testcase_21 AC 327 ms
53,720 KB
testcase_22 AC 330 ms
53,296 KB
testcase_23 AC 327 ms
53,448 KB
testcase_24 AC 334 ms
53,772 KB
testcase_25 AC 331 ms
53,308 KB
testcase_26 AC 330 ms
53,592 KB
testcase_27 AC 332 ms
53,632 KB
testcase_28 AC 327 ms
53,624 KB
testcase_29 AC 330 ms
53,672 KB
testcase_30 AC 327 ms
53,560 KB
testcase_31 AC 329 ms
53,660 KB
testcase_32 AC 329 ms
53,720 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:25:11: warning: parameter 'argv' is never used
fun main( argv : Array<String> ) {
          ^

ソースコード

diff #

import java.util.Scanner

//
fun _Do() {
    
    val N = scan.nextInt()
    val S = strings(N)
    val T = strings(N)
 
    var c=0
    for(i in S.indices){
        if(S[i]!=T[i]){
            break
        }
        c++
    }
    
    println(c+1)
    println(S[c])
    println(T[c])
}

var scan = Scanner(System.`in`)
fun main( argv : Array<String> ) {
    _Do()
}

fun strings(N:Int):Array<String> = Array(N,{scan.next()})
fun ints(N:Int):Array<Int> = Array(N,{scan.nextInt()})
fun longs(N:Int):Array<Long> = Array(N,{scan.nextLong()})
0