結果

問題 No.2778 Is there Same letter?
ユーザー ImTaboo
提出日時 2024-11-24 14:45:04
言語 Kotlin
(2.1.0)
結果
WA  
実行時間 -
コード長 344 bytes
コンパイル時間 11,039 ms
コンパイル使用メモリ 433,460 KB
実行使用メモリ 54,464 KB
最終ジャッジ日時 2024-11-24 14:45:23
合計ジャッジ時間 16,052 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

fun main() {
    readln().toInt()
    val s = readln()

    val counts = Array(26) { 0 }

    var f = true
    for(c in s) {
        when {
            counts[c - 'A'] == 0 -> counts[c - 'A']++
            else -> {
                f = false
                break
            }
        }
    }

    if(f) println("Yes")
    else println("No")
}
0