結果

問題 No.671 1000000007
ユーザー Mcpu3Mcpu3
提出日時 2018-04-15 12:43:07
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 318 bytes
コンパイル時間 1,966 ms
コンパイル使用メモリ 71,308 KB
実行使用メモリ 58,312 KB
最終ジャッジ日時 2023-09-09 05:42:27
合計ジャッジ時間 4,398 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 125 ms
56,060 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class no671{
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		long n=stdIn.nextLong();
		int i=0;
		while(n!=0) {
			n=n/10;
			i++;
		}
		int ans;
		if(i==10) ans=0;
		else if(i>10) ans=i-10;
		else ans=10-i;
		System.out.println(i);
	}
}
0