結果

問題 No.1157 Many Quotients easy
ユーザー xRS43BofaUEZ5gcxRS43BofaUEZ5gc
提出日時 2021-03-17 16:00:59
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 475 bytes
コンパイル時間 3,362 ms
コンパイル使用メモリ 74,428 KB
実行使用メモリ 54,368 KB
最終ジャッジ日時 2024-04-27 07:03:46
合計ジャッジ時間 7,143 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
54,036 KB
testcase_01 AC 107 ms
52,776 KB
testcase_02 AC 120 ms
54,304 KB
testcase_03 AC 105 ms
52,712 KB
testcase_04 AC 115 ms
54,008 KB
testcase_05 AC 115 ms
53,840 KB
testcase_06 AC 125 ms
54,144 KB
testcase_07 AC 109 ms
53,532 KB
testcase_08 AC 119 ms
54,044 KB
testcase_09 AC 107 ms
53,084 KB
testcase_10 AC 120 ms
54,332 KB
testcase_11 AC 106 ms
53,020 KB
testcase_12 AC 116 ms
54,088 KB
testcase_13 AC 114 ms
54,040 KB
testcase_14 AC 118 ms
54,236 KB
testcase_15 AC 117 ms
54,288 KB
testcase_16 AC 118 ms
54,092 KB
testcase_17 AC 104 ms
52,948 KB
testcase_18 AC 121 ms
54,368 KB
testcase_19 AC 116 ms
53,864 KB
testcase_20 AC 118 ms
54,088 KB
testcase_21 AC 121 ms
54,052 KB
testcase_22 AC 120 ms
54,184 KB
testcase_23 AC 123 ms
54,244 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class HelloWorld {

	    public static void main(String[] args) throws Exception {
	    		Scanner sc = new Scanner(System.in);
	            int n = sc.nextInt();
	            sc.close();
	            int count = 1;
	            int temp = 1;
	            for (int i=n/2;i>0;i--) {
	            	if (n / i != temp) {
	            		count ++;
	            		temp = n/i;
	            	}
	            }
	            System.out.println(count);
}}
0