結果

問題 No.9011 数字を全て足そう(数字だけ)
ユーザー juugaya
提出日時 2020-06-12 18:47:37
言語 Java
(openjdk 23)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 465 bytes
コンパイル時間 3,362 ms
コンパイル使用メモリ 75,140 KB
実行使用メモリ 54,456 KB
最終ジャッジ日時 2024-06-24 04:05:49
合計ジャッジ時間 7,410 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class a{
    public  static void main(String[] args){
        Scanner scan  =new Scanner(System.in);
        String a =scan.nextLine(); 
        String [] o =a.split("");
        //int  n =Integer.parseInt(o);  
        int sum =0;
        for(int i=0;i<o.length;i++ ){ 
            sum +=Integer.parseInt(a.substring(i,i+1)  );
            //System.out.print(m+sum);
        }
       System.out.println(sum );
        }
    
    
}
0