結果

問題 No.369 足し間違い
ユーザー yun_appyun_app
提出日時 2016-05-16 10:01:17
言語 Java21
(openjdk 21)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 691 bytes
コンパイル時間 2,154 ms
コンパイル使用メモリ 74,024 KB
実行使用メモリ 39,284 KB
最終ジャッジ日時 2024-04-15 22:19:41
合計ジャッジ時間 3,280 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
37,020 KB
testcase_01 AC 54 ms
37,192 KB
testcase_02 AC 55 ms
37,220 KB
testcase_03 AC 55 ms
36,872 KB
testcase_04 AC 97 ms
39,100 KB
testcase_05 AC 59 ms
37,148 KB
testcase_06 AC 96 ms
39,144 KB
testcase_07 AC 98 ms
39,284 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{

    public static void main (String[] args) throws java.lang.Exception
    {
        // your code goes here
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        String[] lines = br.readLine().split(" ");
        int v = Integer.parseInt(br.readLine());
        
        int sum = 0;
        for(String st:lines){
            sum += Integer.parseInt(st);
        }
        System.out.println(sum-v);
    }
}
0