結果

問題 No.2835 Take and Flip
ユーザー fiblonaria
提出日時 2024-08-15 04:16:52
言語 Java
(openjdk 23)
結果
AC  
実行時間 797 ms / 2,000 ms
コード長 470 bytes
コンパイル時間 3,349 ms
コンパイル使用メモリ 74,312 KB
実行使用メモリ 60,320 KB
最終ジャッジ日時 2024-08-15 04:17:12
合計ジャッジ時間 17,714 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class OptimalGame {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] A = new int[n];
        for (int i = 0; i < n; i++) {
            A[i] = scanner.nextInt();
        }
        long sum = 0;
        for (int i = 0; i < n; i++) {
            sum += A[i];
        }
        System.out.println(sum);
        
        scanner.close();
    }
}
0