結果
問題 |
No.756 チャンパーノウン定数 (1)
|
ユーザー |
![]() |
提出日時 | 2019-02-19 21:01:38 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 128 ms / 2,000 ms |
コード長 | 482 bytes |
コンパイル時間 | 2,071 ms |
コンパイル使用メモリ | 74,260 KB |
実行使用メモリ | 54,244 KB |
最終ジャッジ日時 | 2024-10-12 19:44:43 |
合計ジャッジ時間 | 5,890 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int d = sc.nextInt(); final int MAX = 100; StringBuilder sb = new StringBuilder(); int num = 1; while(true) { sb.append(num); if(sb.length() > MAX) break; num++; } String s = sb.toString(); System.out.println(s.charAt(d-1)); } }