結果

問題 No.480 合計
ユーザー vjudge1
提出日時 2025-03-06 14:37:32
言語 Java
(openjdk 23)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 259 bytes
コンパイル時間 2,779 ms
コンパイル使用メモリ 76,384 KB
実行使用メモリ 54,512 KB
最終ジャッジ日時 2025-03-06 14:37:39
合計ジャッジ時間 6,559 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int x = scanner.nextInt();
        int result = x * (x + 1) / 2;
        System.out.println(result);
    }
}
0