結果

問題 No.547 未知の言語
ユーザー rkyrky
提出日時 2017-11-27 18:55:25
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 323 ms / 2,000 ms
コード長 599 bytes
コンパイル時間 15,481 ms
コンパイル使用メモリ 422,784 KB
実行使用メモリ 55,596 KB
最終ジャッジ日時 2023-08-12 21:24:52
合計ジャッジ時間 26,969 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 318 ms
53,456 KB
testcase_01 AC 319 ms
53,660 KB
testcase_02 AC 316 ms
53,712 KB
testcase_03 AC 318 ms
53,632 KB
testcase_04 AC 316 ms
53,892 KB
testcase_05 AC 316 ms
53,872 KB
testcase_06 AC 320 ms
53,804 KB
testcase_07 AC 320 ms
53,964 KB
testcase_08 AC 309 ms
53,648 KB
testcase_09 AC 314 ms
53,708 KB
testcase_10 AC 315 ms
53,668 KB
testcase_11 AC 314 ms
53,572 KB
testcase_12 AC 315 ms
53,832 KB
testcase_13 AC 317 ms
53,708 KB
testcase_14 AC 320 ms
53,556 KB
testcase_15 AC 321 ms
53,688 KB
testcase_16 AC 319 ms
53,528 KB
testcase_17 AC 316 ms
53,780 KB
testcase_18 AC 321 ms
53,680 KB
testcase_19 AC 315 ms
53,656 KB
testcase_20 AC 318 ms
53,524 KB
testcase_21 AC 317 ms
53,888 KB
testcase_22 AC 316 ms
53,920 KB
testcase_23 AC 320 ms
53,544 KB
testcase_24 AC 321 ms
53,656 KB
testcase_25 AC 316 ms
55,596 KB
testcase_26 AC 323 ms
53,520 KB
testcase_27 AC 320 ms
53,656 KB
testcase_28 AC 317 ms
53,840 KB
testcase_29 AC 318 ms
53,816 KB
testcase_30 AC 314 ms
53,668 KB
testcase_31 AC 318 ms
53,704 KB
testcase_32 AC 321 ms
53,656 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:20:10: warning: parameter 'args' is never used
fun main(args: Array<String>){
         ^

ソースコード

diff #

import java.util.Scanner

var input = Scanner(System. `in`)

fun inputList(testCase: Int): MutableList<String>{
	var list: MutableList<String> = mutableListOf()
	for(i in 1..testCase) list.add( input.next() )
	return list
}

fun jugdeWrong(list: MutableList<String>): String{
	var result: String = ""
	for( (index, value) in list.withIndex() ){
		var str = input.next()
		if(value != str) result = "${index + 1}\n$value\n$str"
	}
	return result
}

fun main(args: Array<String>){
	var testCase: Int = input.nextInt()
	var list: MutableList<String> = inputList(testCase)
	println( jugdeWrong(list) )
}
0