結果

問題 No.300 平方数
ユーザー TatsuDXTatsuDX
提出日時 2016-10-16 22:06:09
言語 Java21
(openjdk 21)
結果
AC  
実行時間 138 ms / 1,000 ms
コード長 294 bytes
コンパイル時間 3,094 ms
コンパイル使用メモリ 72,008 KB
実行使用メモリ 56,312 KB
最終ジャッジ日時 2023-08-14 14:39:37
合計ジャッジ時間 11,501 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,776 KB
testcase_01 AC 123 ms
56,228 KB
testcase_02 AC 122 ms
55,896 KB
testcase_03 AC 124 ms
56,204 KB
testcase_04 AC 123 ms
55,636 KB
testcase_05 AC 125 ms
55,640 KB
testcase_06 AC 124 ms
55,760 KB
testcase_07 AC 124 ms
55,564 KB
testcase_08 AC 122 ms
55,804 KB
testcase_09 AC 122 ms
56,304 KB
testcase_10 AC 122 ms
53,976 KB
testcase_11 AC 123 ms
56,204 KB
testcase_12 AC 123 ms
55,872 KB
testcase_13 AC 138 ms
55,964 KB
testcase_14 AC 123 ms
55,856 KB
testcase_15 AC 122 ms
56,148 KB
testcase_16 AC 131 ms
56,048 KB
testcase_17 AC 122 ms
55,868 KB
testcase_18 AC 122 ms
56,312 KB
testcase_19 AC 121 ms
55,376 KB
testcase_20 AC 126 ms
55,804 KB
testcase_21 AC 132 ms
55,936 KB
testcase_22 AC 124 ms
55,948 KB
testcase_23 AC 128 ms
55,996 KB
testcase_24 AC 131 ms
55,664 KB
testcase_25 AC 137 ms
55,748 KB
testcase_26 AC 132 ms
55,692 KB
testcase_27 AC 128 ms
55,836 KB
testcase_28 AC 136 ms
55,668 KB
testcase_29 AC 135 ms
55,768 KB
testcase_30 AC 137 ms
56,224 KB
testcase_31 AC 129 ms
56,196 KB
testcase_32 AC 134 ms
55,932 KB
testcase_33 AC 131 ms
55,856 KB
testcase_34 AC 136 ms
55,696 KB
testcase_35 AC 133 ms
55,888 KB
testcase_36 AC 129 ms
55,692 KB
testcase_37 AC 132 ms
55,680 KB
testcase_38 AC 127 ms
56,012 KB
testcase_39 AC 134 ms
56,164 KB
testcase_40 AC 137 ms
56,044 KB
testcase_41 AC 127 ms
55,720 KB
testcase_42 AC 127 ms
55,964 KB
testcase_43 AC 129 ms
55,856 KB
testcase_44 AC 135 ms
55,836 KB
testcase_45 AC 130 ms
55,876 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Test {
	public static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		long n = sc.nextLong();
		for(long t = 2; t*t <= n;){
			if(n % (t*t) == 0){
				n /= t*t;
			} else {
				t++;
			}
		}
		System.out.println(n);
	}
}
0