結果

問題 No.671 1000000007
ユーザー GBGB
提出日時 2018-04-20 11:18:57
言語 Java21
(openjdk 21)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 482 bytes
コンパイル時間 3,087 ms
コンパイル使用メモリ 71,708 KB
実行使用メモリ 49,292 KB
最終ジャッジ日時 2023-09-09 11:57:16
合計ジャッジ時間 4,436 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
49,180 KB
testcase_01 AC 42 ms
49,260 KB
testcase_02 AC 42 ms
49,216 KB
testcase_03 AC 42 ms
49,180 KB
testcase_04 AC 42 ms
49,260 KB
testcase_05 AC 42 ms
49,292 KB
testcase_06 AC 42 ms
49,096 KB
testcase_07 AC 42 ms
49,208 KB
testcase_08 AC 43 ms
49,204 KB
testcase_09 AC 42 ms
49,112 KB
testcase_10 AC 42 ms
49,264 KB
testcase_11 AC 42 ms
49,176 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;

class Main{
  public static void main(String[] args) throws IOException{

    int bit=8;
    BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    long n=Long.parseLong(br.readLine());

    String buf=String.valueOf(n);
    int count=buf.length()-2;
    
    if(bit>=count){
      int result=bit-count;
      System.out.println(result);
    }else{
      int result=count-bit;
      System.out.println(result);
    }
  }
}
0