結果

問題 No.1643 Not Substring
ユーザー 👑 箱
提出日時 2021-08-13 21:26:29
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 379 ms / 2,000 ms
コード長 718 bytes
コンパイル時間 17,152 ms
コンパイル使用メモリ 433,284 KB
実行使用メモリ 59,068 KB
最終ジャッジ日時 2024-04-14 19:31:31
合計ジャッジ時間 22,511 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 295 ms
58,824 KB
testcase_01 AC 300 ms
58,916 KB
testcase_02 AC 297 ms
59,012 KB
testcase_03 AC 298 ms
59,004 KB
testcase_04 AC 304 ms
59,044 KB
testcase_05 AC 300 ms
59,032 KB
testcase_06 AC 297 ms
58,864 KB
testcase_07 AC 307 ms
59,004 KB
testcase_08 AC 303 ms
58,764 KB
testcase_09 AC 295 ms
58,856 KB
testcase_10 AC 300 ms
58,760 KB
testcase_11 AC 379 ms
59,004 KB
testcase_12 AC 299 ms
58,932 KB
testcase_13 AC 308 ms
58,920 KB
testcase_14 AC 301 ms
58,796 KB
testcase_15 AC 292 ms
58,980 KB
testcase_16 AC 300 ms
58,768 KB
testcase_17 AC 301 ms
58,920 KB
testcase_18 AC 300 ms
58,896 KB
testcase_19 AC 297 ms
58,872 KB
testcase_20 AC 298 ms
58,924 KB
testcase_21 AC 298 ms
59,024 KB
testcase_22 AC 297 ms
59,068 KB
testcase_23 AC 296 ms
58,912 KB
testcase_24 AC 300 ms
58,860 KB
testcase_25 AC 292 ms
58,728 KB
testcase_26 AC 295 ms
59,020 KB
testcase_27 AC 299 ms
58,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.PrintWriter
import java.util.*
import kotlin.math.*

fun PrintWriter.solve() {
    val s = nextLine()
    val a = s.count { it == 'a' }
    println("a".repeat(a + 1))
}

fun main() {
    Thread(null, {
        val writer = PrintWriter(System.out, false)
        writer.solve()
        writer.flush()
    }, "solve", 1.shl(26)).start()
}

// region Scanner
private var st = StringTokenizer("")
private val br = System.`in`.bufferedReader()

fun next(): String {
    while (!st.hasMoreTokens()) st = StringTokenizer(br.readLine())
    return st.nextToken()
}

fun nextInt() = next().toInt()
fun nextLong() = next().toLong()
fun nextLine() = br.readLine()
fun nextDouble() = next().toDouble()
// endregion
0