結果

問題 No.9011 数字を全て足そう(数字だけ)
ユーザー パカかすみパカかすみ
提出日時 2022-12-05 11:08:19
言語 Java21
(openjdk 21)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 515 bytes
コンパイル時間 3,898 ms
コンパイル使用メモリ 90,472 KB
実行使用メモリ 41,520 KB
最終ジャッジ日時 2024-04-20 13:35:25
合計ジャッジ時間 6,598 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
41,116 KB
testcase_01 AC 102 ms
39,760 KB
testcase_02 AC 113 ms
41,060 KB
testcase_03 AC 114 ms
41,284 KB
testcase_04 AC 113 ms
40,924 KB
testcase_05 AC 117 ms
41,252 KB
testcase_06 AC 122 ms
41,204 KB
testcase_07 AC 114 ms
41,300 KB
testcase_08 AC 109 ms
41,024 KB
testcase_09 AC 111 ms
41,308 KB
testcase_10 AC 102 ms
40,172 KB
testcase_11 AC 101 ms
40,240 KB
testcase_12 AC 112 ms
41,520 KB
testcase_13 AC 112 ms
40,924 KB
testcase_14 AC 105 ms
39,832 KB
testcase_15 AC 112 ms
41,104 KB
testcase_16 AC 113 ms
41,280 KB
testcase_17 AC 113 ms
41,012 KB
testcase_18 AC 115 ms
41,196 KB
testcase_19 AC 99 ms
40,176 KB
testcase_20 AC 112 ms
40,388 KB
testcase_21 AC 108 ms
40,284 KB
testcase_22 AC 116 ms
41,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class App {
    public static void main(String[] args) throws Exception {
        // yukicorder No.9011 数字を全て足そう(数字だけ)

        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        scanner.close();

        List<String> sList = Arrays.asList(s.split(""));
        int total = sList.stream().mapToInt(Integer::parseInt).sum();

        System.out.println(total);
    }
}
0