結果

問題 No.443 GCD of Permutation
ユーザー atuk721atuk721
提出日時 2017-02-13 08:37:08
言語 Haskell
(9.8.2)
結果
TLE  
実行時間 -
コード長 158 bytes
コンパイル時間 667 ms
コンパイル使用メモリ 157,908 KB
実行使用メモリ 31,428 KB
最終ジャッジ日時 2023-08-28 15:06:33
合計ジャッジ時間 4,067 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
11,064 KB
testcase_01 AC 3 ms
7,236 KB
testcase_02 AC 3 ms
7,204 KB
testcase_03 AC 6 ms
10,888 KB
testcase_04 AC 82 ms
15,108 KB
testcase_05 AC 2 ms
7,004 KB
testcase_06 AC 2 ms
7,028 KB
testcase_07 AC 6 ms
10,956 KB
testcase_08 AC 3 ms
7,724 KB
testcase_09 AC 6 ms
11,124 KB
testcase_10 AC 3 ms
7,072 KB
testcase_11 AC 6 ms
11,096 KB
testcase_12 AC 2 ms
7,200 KB
testcase_13 AC 2 ms
7,212 KB
testcase_14 TLE -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.6.1/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

import qualified Data.List as L

main :: IO ()
main = do
  n <- getLine
  let ss = map read .L.permutations $ n
      a = foldr1 gcd ss
  putStrLn . show $ a
0