結果

問題 No.756 チャンパーノウン定数 (1)
ユーザー YamaKasaYamaKasa
提出日時 2019-02-02 22:56:03
言語 Java19
(openjdk 21)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 340 bytes
コンパイル時間 2,102 ms
コンパイル使用メモリ 71,848 KB
実行使用メモリ 56,320 KB
最終ジャッジ日時 2023-08-19 21:14:40
合計ジャッジ時間 6,352 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,476 KB
testcase_01 AC 119 ms
54,500 KB
testcase_02 AC 120 ms
55,732 KB
testcase_03 AC 120 ms
55,660 KB
testcase_04 AC 119 ms
55,700 KB
testcase_05 AC 119 ms
55,688 KB
testcase_06 AC 119 ms
56,252 KB
testcase_07 AC 119 ms
55,908 KB
testcase_08 AC 120 ms
56,004 KB
testcase_09 AC 119 ms
55,764 KB
testcase_10 AC 121 ms
56,060 KB
testcase_11 AC 119 ms
55,932 KB
testcase_12 AC 119 ms
55,612 KB
testcase_13 AC 121 ms
55,420 KB
testcase_14 AC 121 ms
55,896 KB
testcase_15 AC 120 ms
55,948 KB
testcase_16 AC 121 ms
56,320 KB
testcase_17 AC 121 ms
55,728 KB
testcase_18 AC 121 ms
55,828 KB
testcase_19 AC 120 ms
55,880 KB
testcase_20 AC 120 ms
55,884 KB
testcase_21 AC 122 ms
55,452 KB
testcase_22 AC 119 ms
55,420 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();
		StringBuilder sb = new StringBuilder();
		int i = 1;
		while(sb.length() <= n) {
			sb.append(Integer.toString(i));
			i++;
		}
		System.out.println(sb.charAt(n - 1));
	}
}
0