結果

問題 No.300 平方数
ユーザー TatsuDXTatsuDX
提出日時 2016-10-16 22:06:09
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 1,000 ms
コード長 294 bytes
コンパイル時間 2,845 ms
コンパイル使用メモリ 74,980 KB
実行使用メモリ 41,584 KB
最終ジャッジ日時 2024-05-02 02:42:43
合計ジャッジ時間 9,699 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 105 ms
41,232 KB
testcase_01 AC 114 ms
41,304 KB
testcase_02 AC 113 ms
41,208 KB
testcase_03 AC 118 ms
41,360 KB
testcase_04 AC 114 ms
41,080 KB
testcase_05 AC 115 ms
41,120 KB
testcase_06 AC 119 ms
41,056 KB
testcase_07 AC 106 ms
41,156 KB
testcase_08 AC 116 ms
41,156 KB
testcase_09 AC 109 ms
41,224 KB
testcase_10 AC 117 ms
41,128 KB
testcase_11 AC 113 ms
41,332 KB
testcase_12 AC 114 ms
41,224 KB
testcase_13 AC 118 ms
41,492 KB
testcase_14 AC 112 ms
41,244 KB
testcase_15 AC 115 ms
41,372 KB
testcase_16 AC 118 ms
41,288 KB
testcase_17 AC 106 ms
41,388 KB
testcase_18 AC 104 ms
41,440 KB
testcase_19 AC 110 ms
41,396 KB
testcase_20 AC 109 ms
41,200 KB
testcase_21 AC 122 ms
41,364 KB
testcase_22 AC 106 ms
41,164 KB
testcase_23 AC 126 ms
41,464 KB
testcase_24 AC 112 ms
41,552 KB
testcase_25 AC 128 ms
41,352 KB
testcase_26 AC 122 ms
41,116 KB
testcase_27 AC 112 ms
41,520 KB
testcase_28 AC 129 ms
41,284 KB
testcase_29 AC 125 ms
41,148 KB
testcase_30 AC 127 ms
41,108 KB
testcase_31 AC 117 ms
41,584 KB
testcase_32 AC 133 ms
41,364 KB
testcase_33 AC 124 ms
41,212 KB
testcase_34 AC 116 ms
41,344 KB
testcase_35 AC 127 ms
41,384 KB
testcase_36 AC 123 ms
41,380 KB
testcase_37 AC 123 ms
41,204 KB
testcase_38 AC 120 ms
41,448 KB
testcase_39 AC 132 ms
41,000 KB
testcase_40 AC 121 ms
41,244 KB
testcase_41 AC 121 ms
41,192 KB
testcase_42 AC 109 ms
41,244 KB
testcase_43 AC 122 ms
41,224 KB
testcase_44 AC 124 ms
41,256 KB
testcase_45 AC 107 ms
41,096 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