結果

問題 No.693 square1001 and Permutation 2
ユーザー matsuyoshi30
提出日時 2018-06-08 23:04:31
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 338 bytes
コンパイル時間 2,108 ms
コンパイル使用メモリ 74,588 KB
実行使用メモリ 54,336 KB
最終ジャッジ日時 2024-06-30 10:58:22
合計ジャッジ時間 4,295 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 5 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int sum = 0;
        for(int i=0; i<n; i++) sum += in.nextInt();

        int asm = 0;
        for(int i=1; i<=n; i++) asm += i;

        System.out.println(asm - sum);
    }
}
0