結果
問題 |
No.1468 Colourful Pastel
|
ユーザー |
|
提出日時 | 2021-04-10 12:09:56 |
言語 | Kotlin (2.1.0) |
結果 |
AC
|
実行時間 | 623 ms / 1,000 ms |
コード長 | 387 bytes |
コンパイル時間 | 13,513 ms |
コンパイル使用メモリ | 435,764 KB |
実行使用メモリ | 82,920 KB |
最終ジャッジ日時 | 2024-06-26 01:26:29 |
合計ジャッジ時間 | 23,413 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 |
コンパイルメッセージ
Main.kt:3:9: warning: variable 'n' is never used val n = readLine()!!.toInt() ^
ソースコード
fun main() { val colors = listOf("Red", "Orange", "Yellow", "Green", "Cyan", "Blue", "Violet") val n = readLine()!!.toInt() val had = IntArray(7) readLine()!!.split(" ").forEach { had[colors.indexOf(it)]++ } readLine()!!.split(" ").forEach { had[colors.indexOf(it)]-- } for((index, value) in colors.withIndex()){ if(had[index] == 1) println(value) } }