結果

問題 No.2778 Is there Same letter?
ユーザー ImTaboo
提出日時 2024-11-24 14:46:20
言語 Kotlin
(2.1.0)
結果
AC  
実行時間 283 ms / 2,000 ms
コード長 344 bytes
コンパイル時間 9,683 ms
コンパイル使用メモリ 432,828 KB
実行使用メモリ 49,936 KB
最終ジャッジ日時 2024-11-24 14:46:38
合計ジャッジ時間 14,502 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 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("No")
    else println("Yes")
}
0