結果

問題 No.671 1000000007
ユーザー takeya_okinotakeya_okino
提出日時 2018-05-05 20:35:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 294 bytes
コンパイル時間 1,959 ms
コンパイル使用メモリ 72,640 KB
実行使用メモリ 55,912 KB
最終ジャッジ日時 2023-09-10 10:36:55
合計ジャッジ時間 4,268 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,732 KB
testcase_01 AC 118 ms
55,868 KB
testcase_02 AC 118 ms
55,804 KB
testcase_03 AC 118 ms
55,724 KB
testcase_04 AC 118 ms
55,744 KB
testcase_05 AC 118 ms
55,604 KB
testcase_06 AC 117 ms
55,568 KB
testcase_07 AC 120 ms
55,912 KB
testcase_08 AC 119 ms
55,588 KB
testcase_09 AC 118 ms
55,576 KB
testcase_10 AC 120 ms
55,800 KB
testcase_11 AC 121 ms
55,568 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String n = sc.next();
    int a = 0;
    for(int i = 0; i < n.length(); i++) {
      if(n.charAt(i) == '0') a++;
    }
    System.out.println(Math.abs(a - 8));
  }
}
0