結果

問題 No.537 ユーザーID
ユーザー Amanita2016
提出日時 2017-07-01 12:38:17
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 610 bytes
コンパイル時間 2,657 ms
コンパイル使用メモリ 74,120 KB
実行使用メモリ 78,188 KB
最終ジャッジ日時 2024-10-05 03:28:08
合計ジャッジ時間 6,819 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 3 WA * 3 TLE * 1 -- * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		long[] x1 = new long [1000000];
		long[] x2 = new long [1000000];
		int cnt = 0;
		for(long i = 1 ; ; i++){
			if((n%i)==0){
				long ans = n / i ;
				if(ans >= i){
					x1[cnt] = ans;
					x2[cnt] = i;
					cnt++;
				}else{
					break ;
				}
			}
		}
		int x = 0;
		for(int i = 0 ; i < cnt ; i++){
			if(x1[i] == x2[i]){
				x++;
			}else{
				x+=2;
			}
		}
	    System.out.println(x);
	}

}
0