結果

問題 No.1934 Four Fruits
ユーザー kota
提出日時 2022-05-17 16:46:41
言語 Kotlin
(2.1.0)
結果
AC  
実行時間 326 ms / 2,000 ms
コード長 375 bytes
コンパイル時間 13,875 ms
コンパイル使用メモリ 437,556 KB
実行使用メモリ 51,976 KB
最終ジャッジ日時 2024-09-15 11:31:04
合計ジャッジ時間 16,305 ms
ジャッジサーバーID
(参考情報)
judge3 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

fun main() {
    val (a,b,c) = readLine()!!.split(" ").map{it.toInt()}
    if (a == b && b == c) {
        println(a)
    } else if (a != b && b != c && a != c) {
        println(6 - (a + b + c))
    } else {
        if (a == b) {
            println(c)
        } else if (b == c) {
            println(a)
        } else if (a == c) {
            println(b)
        }
    }
}
0