結果
問題 |
No.300 平方数
|
ユーザー |
|
提出日時 | 2015-11-13 23:20:59 |
言語 | Java (openjdk 23) |
結果 |
TLE
|
実行時間 | - |
コード長 | 517 bytes |
コンパイル時間 | 3,449 ms |
コンパイル使用メモリ | 74,636 KB |
実行使用メモリ | 41,844 KB |
最終ジャッジ日時 | 2024-09-13 15:16:47 |
合計ジャッジ時間 | 34,215 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 TLE * 22 |
ソースコード
import java.util.Scanner; public class Yukicoder300 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int cnt; long x = sc.nextLong(), y = 1; for (long i = 2; i < 100000000; i++) { cnt = 0; while (x % i == 0) { x /= i; cnt++; } if (cnt % 2 == 1) y *= i ; if (x == 1) break; } System.out.println(y); } }