結果
問題 | No.1291 小手調べ |
ユーザー | tenten |
提出日時 | 2020-11-24 09:35:07 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 147 ms / 2,000 ms |
コード長 | 480 bytes |
コンパイル時間 | 3,841 ms |
コンパイル使用メモリ | 72,288 KB |
実行使用メモリ | 56,008 KB |
最終ジャッジ日時 | 2023-10-01 00:49:49 |
合計ジャッジ時間 | 5,683 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 126 ms
55,568 KB |
testcase_01 | AC | 138 ms
55,776 KB |
testcase_02 | AC | 138 ms
55,796 KB |
testcase_03 | AC | 147 ms
56,008 KB |
testcase_04 | AC | 135 ms
55,924 KB |
ソースコード
import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); StringBuilder sb = new StringBuilder(); for (int i = 0; i < n; i++) { int d = sc.nextInt(); if (d == 1) { sb.append(10); } else { sb.append(9); for (int j = 1; j < d; j++) { sb.append(0); } } sb.append("\n"); } System.out.print(sb); } }