結果
| 問題 | No.637 X: Yet Another FizzBuzz Problem |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-04-10 19:23:49 |
| 言語 | Kotlin (2.3.20) |
| 結果 |
AC
|
| 実行時間 | 191 ms / 1,000 ms |
| コード長 | 402 bytes |
| 記録 | |
| コンパイル時間 | 8,416 ms |
| コンパイル使用メモリ | 458,444 KB |
| 実行使用メモリ | 53,092 KB |
| 最終ジャッジ日時 | 2026-05-14 18:26:55 |
| 合計ジャッジ時間 | 16,010 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 30 |
ソースコード
package net.ipipip0129.kotlin.yukicoder
fun main(args: Array<String>) {
val list = readLine()!!.split(" ").map { it.toInt() }
var count = 0
list.forEach {
count += if (it % 5 == 0 && it % 3 == 0) {
8
} else if (it % 5 == 0|| it % 3 == 0) {
4
} else {
it.toString().length
}
}
println(count)
}