結果

問題 No.300 平方数
ユーザー gu_21816943gu_21816943
提出日時 2017-06-27 01:35:44
言語 Java21
(openjdk 21)
結果
TLE  
実行時間 -
コード長 512 bytes
コンパイル時間 2,009 ms
コンパイル使用メモリ 74,508 KB
実行使用メモリ 58,980 KB
最終ジャッジ日時 2024-04-15 02:03:09
合計ジャッジ時間 6,270 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
42,940 KB
testcase_01 AC 57 ms
50,544 KB
testcase_02 AC 57 ms
37,332 KB
testcase_03 AC 57 ms
37,248 KB
testcase_04 AC 58 ms
37,452 KB
testcase_05 AC 58 ms
37,404 KB
testcase_06 AC 59 ms
37,280 KB
testcase_07 AC 58 ms
37,048 KB
testcase_08 AC 57 ms
37,048 KB
testcase_09 AC 57 ms
37,044 KB
testcase_10 AC 59 ms
37,152 KB
testcase_11 AC 57 ms
37,280 KB
testcase_12 AC 56 ms
37,148 KB
testcase_13 AC 79 ms
38,176 KB
testcase_14 AC 57 ms
37,280 KB
testcase_15 AC 60 ms
37,460 KB
testcase_16 AC 57 ms
37,000 KB
testcase_17 AC 56 ms
37,360 KB
testcase_18 AC 56 ms
37,452 KB
testcase_19 AC 59 ms
37,152 KB
testcase_20 AC 59 ms
37,404 KB
testcase_21 AC 57 ms
37,280 KB
testcase_22 AC 57 ms
37,504 KB
testcase_23 TLE -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		double num=Double.parseDouble(br.readLine());
		br.close();

		long y=1;

		int i;

		for(i=2;i*i<=num;i++){
			int tmp=0;

			while(num%i==0){
				num/=i;
				tmp++;
			}

			if(tmp%2!=0){
				y*=i;
			}
		}
		if(num>1){
			y*=num;
		}
		System.out.println(y);
	}
}
0