結果

問題 No.547 未知の言語
コンテスト
ユーザー rky
提出日時 2017-11-27 18:55:25
言語 Kotlin
(2.3.20)
コンパイル:
kotlinc _filename_ -include-runtime -d main.jar
実行:
kotlin main.jar
結果
AC  
実行時間 205 ms / 2,000 ms
コード長 599 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 9,040 ms
コンパイル使用メモリ 477,176 KB
実行使用メモリ 52,376 KB
最終ジャッジ日時 2026-05-14 15:40:18
合計ジャッジ時間 16,519 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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