結果

問題 No.1264 010
ユーザー Yosuke YamaguchiYosuke Yamaguchi
提出日時 2021-01-26 22:46:02
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 681 bytes
コンパイル時間 3,876 ms
コンパイル使用メモリ 81,776 KB
実行使用メモリ 56,184 KB
最終ジャッジ日時 2023-09-06 01:48:23
合計ジャッジ時間 6,579 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
56,088 KB
testcase_01 WA -
testcase_02 AC 127 ms
55,464 KB
testcase_03 AC 131 ms
55,880 KB
testcase_04 AC 131 ms
56,100 KB
testcase_05 AC 129 ms
56,184 KB
testcase_06 WA -
testcase_07 AC 126 ms
55,752 KB
testcase_08 AC 131 ms
56,088 KB
testcase_09 AC 131 ms
55,676 KB
testcase_10 AC 133 ms
55,940 KB
testcase_11 AC 133 ms
55,892 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

// https://yukicoder.me/problems/no/1264
public class ZeroOneZero1264 {
  public static void main(String[] args) {
    // 標準入力から読み込む際に、Scan
    Scanner sc = new Scanner(System.in);

    // String 1つ分を読み込む
    int numberOfZero = Integer.parseInt(sc.next()) - 1;
    if (numberOfZero == 0) {
      System.out.println(1);
      return;
    }
    String zeros = IntStream.range(0, numberOfZero).mapToObj(i -> "0").collect(Collectors.joining(""));
    System.out.println("010" + zeros);
    // System.out.println(replaceAll010to101(input));
  }
}
0