結果

問題 No.547 未知の言語
ユーザー rkyrky
提出日時 2017-11-27 18:55:25
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 354 ms / 2,000 ms
コード長 599 bytes
コンパイル時間 9,710 ms
コンパイル使用メモリ 439,416 KB
実行使用メモリ 55,384 KB
最終ジャッジ日時 2024-04-30 16:30:08
合計ジャッジ時間 20,572 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 297 ms
55,176 KB
testcase_01 AC 285 ms
55,276 KB
testcase_02 AC 293 ms
55,300 KB
testcase_03 AC 299 ms
55,272 KB
testcase_04 AC 297 ms
55,328 KB
testcase_05 AC 298 ms
55,264 KB
testcase_06 AC 291 ms
55,168 KB
testcase_07 AC 296 ms
55,316 KB
testcase_08 AC 284 ms
55,284 KB
testcase_09 AC 296 ms
55,272 KB
testcase_10 AC 287 ms
55,260 KB
testcase_11 AC 284 ms
55,244 KB
testcase_12 AC 285 ms
55,252 KB
testcase_13 AC 286 ms
55,328 KB
testcase_14 AC 289 ms
55,128 KB
testcase_15 AC 289 ms
55,292 KB
testcase_16 AC 289 ms
55,236 KB
testcase_17 AC 291 ms
55,264 KB
testcase_18 AC 290 ms
55,176 KB
testcase_19 AC 284 ms
55,292 KB
testcase_20 AC 284 ms
55,264 KB
testcase_21 AC 291 ms
55,300 KB
testcase_22 AC 300 ms
55,216 KB
testcase_23 AC 290 ms
55,152 KB
testcase_24 AC 293 ms
55,292 KB
testcase_25 AC 354 ms
55,328 KB
testcase_26 AC 289 ms
55,344 KB
testcase_27 AC 297 ms
55,200 KB
testcase_28 AC 285 ms
55,272 KB
testcase_29 AC 302 ms
55,384 KB
testcase_30 AC 287 ms
55,284 KB
testcase_31 AC 284 ms
55,180 KB
testcase_32 AC 289 ms
55,180 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