結果

問題 No.741 AscNumber(Easy)
ユーザー htkbhtkb
提出日時 2018-10-05 22:22:37
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 402 ms / 2,000 ms
コード長 310 bytes
コンパイル時間 14,197 ms
コンパイル使用メモリ 418,612 KB
実行使用メモリ 55,368 KB
最終ジャッジ日時 2023-08-13 00:37:41
合計ジャッジ時間 34,867 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 290 ms
53,500 KB
testcase_01 AC 295 ms
53,492 KB
testcase_02 AC 298 ms
53,380 KB
testcase_03 AC 298 ms
53,544 KB
testcase_04 AC 299 ms
53,484 KB
testcase_05 AC 324 ms
53,652 KB
testcase_06 AC 312 ms
53,576 KB
testcase_07 AC 310 ms
53,704 KB
testcase_08 AC 324 ms
53,784 KB
testcase_09 AC 319 ms
53,512 KB
testcase_10 AC 323 ms
53,536 KB
testcase_11 AC 327 ms
53,552 KB
testcase_12 AC 301 ms
53,476 KB
testcase_13 AC 317 ms
53,388 KB
testcase_14 AC 319 ms
53,544 KB
testcase_15 AC 304 ms
53,404 KB
testcase_16 AC 324 ms
53,480 KB
testcase_17 AC 328 ms
53,572 KB
testcase_18 AC 316 ms
53,980 KB
testcase_19 AC 325 ms
53,500 KB
testcase_20 AC 298 ms
53,492 KB
testcase_21 AC 302 ms
53,556 KB
testcase_22 AC 312 ms
53,484 KB
testcase_23 AC 301 ms
53,540 KB
testcase_24 AC 311 ms
53,644 KB
testcase_25 AC 321 ms
53,620 KB
testcase_26 AC 320 ms
53,756 KB
testcase_27 AC 321 ms
53,500 KB
testcase_28 AC 324 ms
53,404 KB
testcase_29 AC 321 ms
53,568 KB
testcase_30 AC 321 ms
53,796 KB
testcase_31 AC 313 ms
53,412 KB
testcase_32 AC 311 ms
53,360 KB
testcase_33 AC 322 ms
53,504 KB
testcase_34 AC 334 ms
53,388 KB
testcase_35 AC 402 ms
53,576 KB
testcase_36 AC 375 ms
53,628 KB
testcase_37 AC 376 ms
53,932 KB
testcase_38 AC 374 ms
53,608 KB
testcase_39 AC 347 ms
53,572 KB
testcase_40 AC 351 ms
53,660 KB
testcase_41 AC 350 ms
53,440 KB
testcase_42 AC 332 ms
53,540 KB
testcase_43 AC 320 ms
53,728 KB
testcase_44 AC 347 ms
53,536 KB
testcase_45 AC 342 ms
53,520 KB
testcase_46 AC 356 ms
53,520 KB
testcase_47 AC 311 ms
54,024 KB
testcase_48 AC 358 ms
53,532 KB
testcase_49 AC 337 ms
53,468 KB
testcase_50 AC 328 ms
53,620 KB
testcase_51 AC 332 ms
55,368 KB
testcase_52 AC 381 ms
53,568 KB
testcase_53 AC 385 ms
53,492 KB
testcase_54 AC 371 ms
53,704 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:3:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val N = sc.nextInt()
    val a = IntArray(9) { 1 }
    val mod = 1000000007
    var ans = 1
    for (i in 1..N) {
        for (j in 1..8) a[j] = (a[j]+a[j-1]) % mod
        ans = (ans+a[8]) % mod
    }
    println(ans)
}
0