結果

問題 No.537 ユーザーID
ユーザー fjafjafjafjafjafja
提出日時 2017-08-15 13:19:12
言語 Java21
(openjdk 21)
結果
TLE  
実行時間 -
コード長 440 bytes
コンパイル時間 4,402 ms
コンパイル使用メモリ 77,536 KB
実行使用メモリ 47,420 KB
最終ジャッジ日時 2024-04-21 12:30:19
合計ジャッジ時間 9,966 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 145 ms
46,916 KB
testcase_01 AC 144 ms
41,772 KB
testcase_02 AC 146 ms
41,312 KB
testcase_03 AC 144 ms
41,520 KB
testcase_04 AC 148 ms
41,648 KB
testcase_05 AC 137 ms
41,004 KB
testcase_06 AC 131 ms
40,464 KB
testcase_07 AC 143 ms
41,524 KB
testcase_08 AC 145 ms
41,496 KB
testcase_09 AC 142 ms
41,532 KB
testcase_10 AC 145 ms
41,540 KB
testcase_11 AC 145 ms
41,636 KB
testcase_12 AC 143 ms
41,500 KB
testcase_13 AC 131 ms
40,284 KB
testcase_14 AC 146 ms
41,556 KB
testcase_15 AC 148 ms
41,492 KB
testcase_16 AC 145 ms
41,484 KB
testcase_17 AC 133 ms
40,284 KB
testcase_18 TLE -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.HashSet;
import java.util.Scanner;

public class N537
{
	public static void main(String[] args)
	{
		Scanner sc=new Scanner(System.in);
		long N=sc.nextLong();
		HashSet<String> hs=new HashSet<String>();
		for(int i=1;i<=((N%2==0)?N/2:(N-1)/2);i++)
		{
			if(N%i==0)
			{
				String sf=String.valueOf(i);
				String ss=String.valueOf(N/i);
				hs.add(sf+ss);
			}
		}
		hs.add(N+"1");
		System.out.println(hs.size());
	}

}
0