結果

問題 No.976 2 の 128 乗と M
ユーザー 👑 箱
提出日時 2020-06-03 09:33:26
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 298 ms / 2,000 ms
コード長 905 bytes
コンパイル時間 11,606 ms
コンパイル使用メモリ 432,668 KB
実行使用メモリ 54,504 KB
最終ジャッジ日時 2024-05-03 21:55:08
合計ジャッジ時間 28,550 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 286 ms
54,108 KB
testcase_01 AC 290 ms
54,088 KB
testcase_02 AC 295 ms
54,336 KB
testcase_03 AC 281 ms
54,140 KB
testcase_04 AC 288 ms
54,400 KB
testcase_05 AC 288 ms
54,284 KB
testcase_06 AC 290 ms
54,088 KB
testcase_07 AC 286 ms
54,380 KB
testcase_08 AC 290 ms
54,268 KB
testcase_09 AC 291 ms
54,096 KB
testcase_10 AC 287 ms
54,288 KB
testcase_11 AC 291 ms
54,312 KB
testcase_12 AC 296 ms
54,172 KB
testcase_13 AC 284 ms
54,096 KB
testcase_14 AC 288 ms
54,308 KB
testcase_15 AC 293 ms
54,200 KB
testcase_16 AC 287 ms
54,092 KB
testcase_17 AC 291 ms
54,420 KB
testcase_18 AC 291 ms
54,156 KB
testcase_19 AC 285 ms
54,408 KB
testcase_20 AC 287 ms
54,308 KB
testcase_21 AC 293 ms
54,212 KB
testcase_22 AC 287 ms
54,504 KB
testcase_23 AC 287 ms
54,152 KB
testcase_24 AC 293 ms
54,340 KB
testcase_25 AC 288 ms
54,340 KB
testcase_26 AC 288 ms
54,152 KB
testcase_27 AC 289 ms
54,264 KB
testcase_28 AC 286 ms
54,068 KB
testcase_29 AC 288 ms
54,096 KB
testcase_30 AC 296 ms
54,216 KB
testcase_31 AC 292 ms
54,240 KB
testcase_32 AC 288 ms
54,192 KB
testcase_33 AC 285 ms
54,188 KB
testcase_34 AC 290 ms
54,376 KB
testcase_35 AC 291 ms
54,464 KB
testcase_36 AC 294 ms
54,232 KB
testcase_37 AC 288 ms
54,388 KB
testcase_38 AC 294 ms
54,220 KB
testcase_39 AC 291 ms
54,336 KB
testcase_40 AC 288 ms
54,240 KB
testcase_41 AC 292 ms
54,196 KB
testcase_42 AC 287 ms
54,240 KB
testcase_43 AC 293 ms
54,356 KB
testcase_44 AC 288 ms
54,080 KB
testcase_45 AC 289 ms
54,220 KB
testcase_46 AC 291 ms
54,356 KB
testcase_47 AC 292 ms
54,080 KB
testcase_48 AC 289 ms
54,228 KB
testcase_49 AC 298 ms
54,240 KB
testcase_50 AC 296 ms
54,084 KB
testcase_51 AC 287 ms
54,392 KB
testcase_52 AC 287 ms
54,368 KB
testcase_53 AC 290 ms
54,268 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:14:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

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

fun PrintWriter.solve(sc: FastScanner) {
    val m = sc.nextLong().toBigInteger()
    var n = 2.toBigInteger().pow(128)
    println(n % m)
}

fun main(args: Array<String>) {
    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