結果

問題 No.481 1から10
ユーザー Yosuke YamaguchiYosuke Yamaguchi
提出日時 2020-12-29 23:42:25
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 540 bytes
コンパイル時間 3,446 ms
コンパイル使用メモリ 75,268 KB
実行使用メモリ 41,424 KB
最終ジャッジ日時 2024-04-16 00:33:28
合計ジャッジ時間 5,277 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

// https://yukicoder.me/problems/no/481
public class OneToTen481 {
  public static void main(String[] args) {
    // 標準入力から読み込む際に、Scan
    Scanner sc = new Scanner(System.in);
    // String 1つ分を読み込む
    int result = 0;
    int n = 0;
    while (result < 10) {
      int s1 = Integer.parseInt(sc.next());
      n += 1;
      if (s1 - n > 0 && result == 0) {
        // 標準出力に書き出す。
        result = n;
      }
    }
    System.out.println(result);
  }
}
0