結果

問題 No.300 平方数
ユーザー kzyKTkzyKT
提出日時 2015-11-04 01:12:27
言語 Scala(Beta)
(3.4.0)
結果
AC  
実行時間 930 ms / 1,000 ms
コード長 306 bytes
コンパイル時間 7,420 ms
コンパイル使用メモリ 238,004 KB
実行使用メモリ 62,860 KB
最終ジャッジ日時 2023-09-02 02:58:16
合計ジャッジ時間 52,802 ms
ジャッジサーバーID
(参考情報)
judge16 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 915 ms
62,416 KB
testcase_01 AC 921 ms
62,652 KB
testcase_02 AC 907 ms
62,412 KB
testcase_03 AC 906 ms
62,424 KB
testcase_04 AC 907 ms
62,464 KB
testcase_05 AC 907 ms
62,428 KB
testcase_06 AC 915 ms
62,596 KB
testcase_07 AC 919 ms
62,552 KB
testcase_08 AC 902 ms
62,536 KB
testcase_09 AC 896 ms
62,588 KB
testcase_10 AC 889 ms
62,444 KB
testcase_11 AC 885 ms
62,384 KB
testcase_12 AC 899 ms
62,396 KB
testcase_13 AC 906 ms
62,396 KB
testcase_14 AC 885 ms
62,660 KB
testcase_15 AC 873 ms
62,568 KB
testcase_16 AC 891 ms
62,680 KB
testcase_17 AC 876 ms
62,464 KB
testcase_18 AC 888 ms
62,572 KB
testcase_19 AC 889 ms
62,504 KB
testcase_20 AC 901 ms
62,376 KB
testcase_21 AC 890 ms
62,612 KB
testcase_22 AC 893 ms
62,696 KB
testcase_23 AC 907 ms
62,432 KB
testcase_24 AC 906 ms
62,412 KB
testcase_25 AC 906 ms
62,544 KB
testcase_26 AC 905 ms
62,468 KB
testcase_27 AC 883 ms
62,860 KB
testcase_28 AC 907 ms
62,544 KB
testcase_29 AC 891 ms
62,852 KB
testcase_30 AC 901 ms
62,624 KB
testcase_31 AC 894 ms
62,576 KB
testcase_32 AC 909 ms
62,448 KB
testcase_33 AC 892 ms
62,856 KB
testcase_34 AC 891 ms
62,504 KB
testcase_35 AC 930 ms
62,408 KB
testcase_36 AC 883 ms
62,516 KB
testcase_37 AC 886 ms
62,440 KB
testcase_38 AC 880 ms
62,636 KB
testcase_39 AC 888 ms
62,412 KB
testcase_40 AC 877 ms
62,432 KB
testcase_41 AC 905 ms
62,580 KB
testcase_42 AC 888 ms
62,736 KB
testcase_43 AC 884 ms
62,452 KB
testcase_44 AC 900 ms
62,360 KB
testcase_45 AC 888 ms
62,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner

object Main {
  def main(args: Array[String]) = {
    val sc=new Scanner(System.in)
    var x=sc.nextLong
    var y:Long=1
    var i:Long=2
    while(i*i<=x) {
      while(x%i==0) {
        x=x/i
        if(y%i!=0) y=y*i else y=y/i
      }
      i=i+1
    }
    println(x*y)
  }
}
0