結果

問題 No.1162 Many Quotients hard
ユーザー 👑 箱星箱星
提出日時 2020-08-19 18:25:07
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 833 bytes
コンパイル時間 11,531 ms
コンパイル使用メモリ 433,868 KB
実行使用メモリ 49,992 KB
最終ジャッジ日時 2024-04-20 09:42:41
合計ジャッジ時間 26,260 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 295 ms
49,476 KB
testcase_01 WA -
testcase_02 AC 301 ms
49,528 KB
testcase_03 WA -
testcase_04 AC 296 ms
49,804 KB
testcase_05 AC 302 ms
49,696 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 292 ms
49,736 KB
testcase_09 WA -
testcase_10 AC 298 ms
49,824 KB
testcase_11 AC 301 ms
49,884 KB
testcase_12 WA -
testcase_13 AC 292 ms
49,884 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 294 ms
49,960 KB
testcase_17 AC 297 ms
49,492 KB
testcase_18 WA -
testcase_19 AC 296 ms
49,656 KB
testcase_20 AC 298 ms
49,692 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 297 ms
49,684 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 300 ms
49,800 KB
testcase_29 AC 297 ms
49,800 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 293 ms
49,784 KB
testcase_33 WA -
testcase_34 AC 296 ms
49,880 KB
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 295 ms
49,992 KB
testcase_40 AC 293 ms
49,876 KB
testcase_41 WA -
testcase_42 AC 296 ms
49,708 KB
testcase_43 AC 291 ms
49,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader
import java.io.InputStream
import java.io.InputStreamReader
import java.io.PrintWriter
import java.util.*

fun PrintWriter.solve(sc: FastScanner) {
    val n = sc.nextLong()
    println(2 * Math.sqrt(n.toDouble()).toLong())
}

fun main() {
    val writer = PrintWriter(System.out, false)
    writer.solve(FastScanner(System.`in`))
    writer.flush()
}

class FastScanner(s: InputStream) {
    private var st = StringTokenizer("")
    private val br = BufferedReader(InputStreamReader(s))

    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()
    fun ready() = br.ready()
}
0