結果

問題 No.1114 足し算盆に返らず
ユーザー 遭難者遭難者
提出日時 2020-10-13 12:06:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 179 ms / 2,000 ms
コード長 385 bytes
コンパイル時間 3,179 ms
コンパイル使用メモリ 72,616 KB
実行使用メモリ 42,688 KB
最終ジャッジ日時 2023-09-28 00:01:30
合計ジャッジ時間 11,029 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 169 ms
42,268 KB
testcase_01 AC 166 ms
42,688 KB
testcase_02 AC 169 ms
42,200 KB
testcase_03 AC 164 ms
41,456 KB
testcase_04 AC 164 ms
42,036 KB
testcase_05 AC 149 ms
41,488 KB
testcase_06 AC 157 ms
42,420 KB
testcase_07 AC 166 ms
42,136 KB
testcase_08 AC 155 ms
41,072 KB
testcase_09 AC 167 ms
41,260 KB
testcase_10 AC 158 ms
41,284 KB
testcase_11 AC 144 ms
39,732 KB
testcase_12 AC 170 ms
41,788 KB
testcase_13 AC 172 ms
42,152 KB
testcase_14 AC 146 ms
40,280 KB
testcase_15 AC 153 ms
40,560 KB
testcase_16 AC 153 ms
41,188 KB
testcase_17 AC 168 ms
41,864 KB
testcase_18 AC 151 ms
40,616 KB
testcase_19 AC 155 ms
41,216 KB
testcase_20 AC 179 ms
42,036 KB
testcase_21 AC 150 ms
40,700 KB
testcase_22 AC 111 ms
39,436 KB
testcase_23 AC 109 ms
39,072 KB
testcase_24 AC 111 ms
39,508 KB
testcase_25 AC 115 ms
39,344 KB
testcase_26 AC 110 ms
39,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		int n = Integer.parseInt(sc.next());
		for(int i = 1 ; i <= n ; i++){
			if(i % 2 == 1){
				ou.print(i);
				if(i < n - 1) ou.print(" ");
			}
		}
		ou.println();
		ou.flush();
		sc.close();
	}
}
0