結果

問題 No.756 チャンパーノウン定数 (1)
ユーザー Grenache
提出日時 2019-04-26 15:46:27
言語 Java
(openjdk 23)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 649 bytes
コンパイル時間 3,479 ms
コンパイル使用メモリ 75,120 KB
実行使用メモリ 54,536 KB
最終ジャッジ日時 2024-11-24 13:07:57
合計ジャッジ時間 6,667 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

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


public class Main_yukicoder756 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int d = sc.nextInt();

		StringBuilder c10 = new StringBuilder();
		for (int i = 1; c10.length() < d; i++) {
			c10.append(i);
		}

		pr.println(c10.charAt(d - 1));
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);
			
		solve();
			
		pr.close();
		sc.close();
	}

	static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
}
0