結果

問題 No.339 何人が回答したのか
ユーザー yudedakoyudedako
提出日時 2016-01-31 16:44:07
言語 Scala(Beta)
(3.4.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 444 bytes
コンパイル時間 9,451 ms
コンパイル使用メモリ 261,540 KB
実行使用メモリ 64,228 KB
最終ジャッジ日時 2023-09-11 23:17:43
合計ジャッジ時間 74,671 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 969 ms
61,676 KB
testcase_01 AC 955 ms
62,412 KB
testcase_02 AC 954 ms
62,064 KB
testcase_03 AC 972 ms
61,904 KB
testcase_04 AC 957 ms
62,440 KB
testcase_05 AC 957 ms
61,908 KB
testcase_06 AC 958 ms
61,784 KB
testcase_07 AC 946 ms
62,000 KB
testcase_08 AC 948 ms
62,128 KB
testcase_09 AC 951 ms
62,068 KB
testcase_10 AC 950 ms
61,908 KB
testcase_11 AC 948 ms
61,972 KB
testcase_12 AC 959 ms
64,228 KB
testcase_13 AC 961 ms
61,888 KB
testcase_14 AC 956 ms
62,124 KB
testcase_15 AC 965 ms
62,168 KB
testcase_16 AC 983 ms
63,100 KB
testcase_17 AC 971 ms
61,676 KB
testcase_18 AC 966 ms
61,888 KB
testcase_19 AC 981 ms
61,832 KB
testcase_20 AC 961 ms
61,964 KB
testcase_21 AC 972 ms
61,728 KB
testcase_22 AC 966 ms
61,964 KB
testcase_23 AC 971 ms
62,196 KB
testcase_24 AC 971 ms
62,172 KB
testcase_25 AC 972 ms
62,036 KB
testcase_26 AC 963 ms
62,216 KB
testcase_27 AC 963 ms
62,104 KB
testcase_28 AC 961 ms
61,676 KB
testcase_29 AC 938 ms
62,008 KB
testcase_30 AC 945 ms
63,208 KB
testcase_31 AC 953 ms
62,064 KB
testcase_32 TLE -
testcase_33 AC 947 ms
61,916 KB
testcase_34 AC 948 ms
61,888 KB
testcase_35 AC 954 ms
61,808 KB
testcase_36 AC 975 ms
61,864 KB
testcase_37 AC 961 ms
61,800 KB
testcase_38 AC 967 ms
61,872 KB
testcase_39 AC 955 ms
62,252 KB
testcase_40 AC 957 ms
61,940 KB
testcase_41 AC 969 ms
61,812 KB
testcase_42 AC 967 ms
61,976 KB
testcase_43 AC 973 ms
62,020 KB
testcase_44 AC 959 ms
61,784 KB
testcase_45 AC 955 ms
61,856 KB
testcase_46 AC 964 ms
62,560 KB
testcase_47 AC 962 ms
61,716 KB
testcase_48 AC 967 ms
62,076 KB
testcase_49 AC 968 ms
61,888 KB
testcase_50 AC 967 ms
62,172 KB
testcase_51 AC 955 ms
61,884 KB
testcase_52 AC 948 ms
61,888 KB
testcase_53 AC 960 ms
61,844 KB
testcase_54 AC 954 ms
62,136 KB
testcase_55 AC 969 ms
61,736 KB
testcase_56 AC 954 ms
62,000 KB
testcase_57 AC 958 ms
61,948 KB
testcase_58 AC 943 ms
62,084 KB
testcase_59 AC 941 ms
62,880 KB
testcase_60 AC 962 ms
61,692 KB
testcase_61 AC 957 ms
61,900 KB
testcase_62 AC 951 ms
62,204 KB
testcase_63 AC 970 ms
61,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

object Yuki extends App{
  import scala.io.StdIn.readLine
  def gcd(a:Int, b:Int):Int = {
    b match {
      case 0 => a
      case _ => gcd(b, a % b)
    }
  }
  def foldr[a, b](f:(a, b)=>b, list:List[a], init:b):b = {
    list match{
      case Nil => init
      case h::tail => foldr(f, tail, f(h, init))
    }
  }
  val n = readLine.toInt
  val list = for (_ <- (1 to n).toList) yield readLine.toInt
  println(100 / foldr(gcd, list, 0))
}
0