結果
問題 |
No.300 平方数
|
ユーザー |
![]() |
提出日時 | 2016-03-08 15:50:51 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 295 bytes |
コンパイル時間 | 2,219 ms |
コンパイル使用メモリ | 74,116 KB |
実行使用メモリ | 54,436 KB |
最終ジャッジ日時 | 2024-09-24 13:56:58 |
合計ジャッジ時間 | 9,166 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 42 WA * 1 |
ソースコード
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long x = sc.nextLong(); sc.close(); while(x%4==0) x=x/4; for(long i=3; i*i<x; i += 2){ while(x%(i*i) == 0) x=x/(i*i); } System.out.println(x); } }