結果

問題 No.480 合計
ユーザー nohopen
提出日時 2019-06-29 15:38:50
言語 Java
(openjdk 23)
結果
AC  
実行時間 129 ms / 2,000 ms
コード長 290 bytes
コンパイル時間 2,126 ms
コンパイル使用メモリ 75,720 KB
実行使用メモリ 41,344 KB
最終ジャッジ日時 2024-07-02 05:34:27
合計ジャッジ時間 5,832 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.stream.IntStream;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt( sc.next() );
    int sum = IntStream.range(1, n + 1).sum();
    System.out.println(sum);
  }
}
0