結果

問題 No.289 数字を全て足そう
ユーザー fal_rndfal_rnd
提出日時 2017-03-13 23:59:42
言語 Java21
(openjdk 21)
結果
AC  
実行時間 136 ms / 1,000 ms
コード長 321 bytes
コンパイル時間 4,946 ms
コンパイル使用メモリ 72,924 KB
実行使用メモリ 56,120 KB
最終ジャッジ日時 2023-09-12 12:16:59
合計ジャッジ時間 7,831 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
56,092 KB
testcase_01 AC 118 ms
55,520 KB
testcase_02 AC 119 ms
55,356 KB
testcase_03 AC 118 ms
55,688 KB
testcase_04 AC 118 ms
55,704 KB
testcase_05 AC 127 ms
55,688 KB
testcase_06 AC 126 ms
55,764 KB
testcase_07 AC 135 ms
55,368 KB
testcase_08 AC 134 ms
56,052 KB
testcase_09 AC 124 ms
55,884 KB
testcase_10 AC 131 ms
55,672 KB
testcase_11 AC 132 ms
55,692 KB
testcase_12 AC 135 ms
56,000 KB
testcase_13 AC 133 ms
55,616 KB
testcase_14 AC 136 ms
56,120 KB
testcase_15 AC 131 ms
55,796 KB
testcase_16 AC 132 ms
55,372 KB
testcase_17 AC 132 ms
55,648 KB
testcase_18 AC 135 ms
55,696 KB
testcase_19 AC 133 ms
55,772 KB
testcase_20 AC 132 ms
55,616 KB
testcase_21 AC 118 ms
55,656 KB
testcase_22 AC 134 ms
55,996 KB
testcase_23 AC 136 ms
55,724 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class A{
	static Scanner s = new Scanner(System.in);
	public static void main(String[] args) {
	}

	static {
		char in[] = s.next().toCharArray();
		int result=0;
		for(int i=0;i<in.length;i++) {
			if('0'<=in[i]&&in[i]<='9') {
				result+=in[i]-'0';
			}
		}
		System.out.println(result);
	}
}
0