結果

問題 No.289 数字を全て足そう
ユーザー ぴろずぴろず
提出日時 2015-10-17 15:31:56
言語 Java21
(openjdk 21)
結果
AC  
実行時間 155 ms / 1,000 ms
コード長 245 bytes
コンパイル時間 2,225 ms
コンパイル使用メモリ 78,036 KB
実行使用メモリ 41,960 KB
最終ジャッジ日時 2024-04-16 19:17:56
合計ジャッジ時間 6,494 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
41,608 KB
testcase_01 AC 130 ms
41,500 KB
testcase_02 AC 114 ms
41,400 KB
testcase_03 AC 130 ms
41,520 KB
testcase_04 AC 129 ms
41,396 KB
testcase_05 AC 136 ms
41,492 KB
testcase_06 AC 136 ms
41,304 KB
testcase_07 AC 150 ms
41,432 KB
testcase_08 AC 153 ms
41,820 KB
testcase_09 AC 126 ms
41,492 KB
testcase_10 AC 141 ms
41,800 KB
testcase_11 AC 147 ms
41,632 KB
testcase_12 AC 147 ms
41,612 KB
testcase_13 AC 143 ms
41,540 KB
testcase_14 AC 150 ms
41,732 KB
testcase_15 AC 144 ms
41,388 KB
testcase_16 AC 142 ms
41,424 KB
testcase_17 AC 148 ms
41,584 KB
testcase_18 AC 150 ms
41,516 KB
testcase_19 AC 155 ms
41,644 KB
testcase_20 AC 151 ms
41,960 KB
testcase_21 AC 126 ms
41,436 KB
testcase_22 AC 145 ms
41,668 KB
testcase_23 AC 147 ms
41,556 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no289;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		System.out.println(sc.next().chars().filter(Character::isDigit).map(x -> (x - '0')).sum());
	}

}
0