結果

問題 No.537 ユーザーID
ユーザー syuki791syuki791
提出日時 2017-07-02 13:32:59
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 488 bytes
コンパイル時間 2,409 ms
コンパイル使用メモリ 75,740 KB
実行使用メモリ 56,032 KB
最終ジャッジ日時 2024-04-15 11:53:41
合計ジャッジ時間 8,222 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
54,024 KB
testcase_01 AC 133 ms
53,804 KB
testcase_02 AC 132 ms
54,272 KB
testcase_03 AC 135 ms
54,124 KB
testcase_04 AC 133 ms
54,124 KB
testcase_05 AC 133 ms
53,980 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 135 ms
54,252 KB
testcase_10 AC 132 ms
54,100 KB
testcase_11 AC 134 ms
53,780 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 144 ms
54,320 KB
testcase_19 AC 147 ms
54,308 KB
testcase_20 AC 146 ms
53,972 KB
testcase_21 AC 146 ms
54,096 KB
testcase_22 AC 150 ms
54,076 KB
testcase_23 AC 145 ms
53,640 KB
testcase_24 AC 138 ms
54,240 KB
testcase_25 AC 154 ms
53,920 KB
testcase_26 AC 151 ms
53,748 KB
testcase_27 AC 145 ms
54,388 KB
testcase_28 AC 141 ms
54,096 KB
testcase_29 AC 146 ms
53,904 KB
testcase_30 AC 147 ms
54,064 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	
	public static void main(String[] args){
		Scanner s = new Scanner(System.in);
		String str = s.next();
		s.close();
		long n = Long.parseLong(str);
		long count = 0;
		double sqrt = Math.sqrt((double)n);
		long heihou = (long) Math.floor(Math.sqrt((double)n));
		if(sqrt==(double)heihou){
			count--;
		}
		for(long i= 1;i<=heihou;i++){
			if(n%i==0){
				count++;
				count++;
				
			}
		}
		
			
		System.out.println(count);
		
	}

}
0