結果

問題 No.627 ランダムウォークの軌跡
ユーザー ichibanshiboriichibanshibori
提出日時 2018-05-03 00:21:20
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 298 ms / 2,000 ms
コード長 342 bytes
コンパイル時間 12,418 ms
コンパイル使用メモリ 421,036 KB
実行使用メモリ 54,444 KB
最終ジャッジ日時 2023-08-12 23:33:16
合計ジャッジ時間 23,410 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 286 ms
52,608 KB
testcase_01 AC 283 ms
52,632 KB
testcase_02 AC 288 ms
52,548 KB
testcase_03 AC 283 ms
52,632 KB
testcase_04 AC 280 ms
52,908 KB
testcase_05 AC 283 ms
52,644 KB
testcase_06 AC 283 ms
52,848 KB
testcase_07 AC 281 ms
52,856 KB
testcase_08 AC 287 ms
52,736 KB
testcase_09 AC 292 ms
54,444 KB
testcase_10 AC 284 ms
52,752 KB
testcase_11 AC 288 ms
52,720 KB
testcase_12 AC 289 ms
52,620 KB
testcase_13 AC 282 ms
52,648 KB
testcase_14 AC 289 ms
52,644 KB
testcase_15 AC 288 ms
52,740 KB
testcase_16 AC 294 ms
52,796 KB
testcase_17 AC 287 ms
52,652 KB
testcase_18 AC 291 ms
52,656 KB
testcase_19 AC 290 ms
52,740 KB
testcase_20 AC 288 ms
52,972 KB
testcase_21 AC 293 ms
53,112 KB
testcase_22 AC 287 ms
52,924 KB
testcase_23 AC 285 ms
52,620 KB
testcase_24 AC 289 ms
52,680 KB
testcase_25 AC 288 ms
52,712 KB
testcase_26 AC 291 ms
52,620 KB
testcase_27 AC 289 ms
52,624 KB
testcase_28 AC 298 ms
52,804 KB
testcase_29 AC 298 ms
52,636 KB
testcase_30 AC 288 ms
52,668 KB
testcase_31 AC 291 ms
52,800 KB
testcase_32 AC 282 ms
52,656 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:3:10: warning: parameter 'args' is never used
fun main(args : Array<String>) {
         ^

ソースコード

diff #

import kotlin.math.abs

fun main(args : Array<String>) {
	val T = (readLine() ?: "").run { toInt() }
	val xLst = IntRange(1, T).map { readLine() ?: "" }.map { it.toInt() }
	
	(listOf(0) + xLst)
		.zipWithNext()
		.all { abs(it.first - it.second) == 1 }
		.let {
			when(it) {
				true -> "T"
				false -> "F"
			}
		}
		.let { println(it) }
}
0