結果

問題 No.480 合計
ユーザー UEUEUE66UEUEUE66
提出日時 2018-05-16 18:23:57
言語 Scala(Beta)
(3.3.1)
結果
AC  
実行時間 925 ms / 2,000 ms
コード長 252 bytes
コンパイル時間 8,125 ms
コンパイル使用メモリ 246,148 KB
実行使用メモリ 62,756 KB
最終ジャッジ日時 2023-09-12 19:14:52
合計ジャッジ時間 29,758 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 919 ms
62,400 KB
testcase_01 AC 918 ms
62,556 KB
testcase_02 AC 922 ms
62,576 KB
testcase_03 AC 911 ms
62,568 KB
testcase_04 AC 909 ms
62,536 KB
testcase_05 AC 914 ms
62,576 KB
testcase_06 AC 925 ms
62,408 KB
testcase_07 AC 907 ms
62,532 KB
testcase_08 AC 912 ms
62,408 KB
testcase_09 AC 917 ms
62,440 KB
testcase_10 AC 908 ms
62,396 KB
testcase_11 AC 925 ms
62,600 KB
testcase_12 AC 921 ms
62,600 KB
testcase_13 AC 924 ms
62,756 KB
testcase_14 AC 909 ms
62,400 KB
testcase_15 AC 913 ms
62,500 KB
testcase_16 AC 925 ms
62,416 KB
testcase_17 AC 908 ms
62,480 KB
testcase_18 AC 909 ms
62,724 KB
testcase_19 AC 914 ms
62,440 KB
testcase_20 AC 911 ms
62,492 KB
testcase_21 AC 893 ms
62,428 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner

object test {
  def main(args: Array[String]): Unit = {
    //println("1+...+N, N?")
    val sc = new Scanner(System.in)
    val a = sc.nextInt
    var x = 0

    for (c <- 0 to a) {
      x = x + c
    }

    println(x)
  }
}
0