結果

問題 No.356 円周上を回る3つの動点の一致
ユーザー TatsunoTatsuno
提出日時 2016-04-02 00:06:55
言語 Haskell
(9.8.2)
結果
TLE  
実行時間 -
コード長 365 bytes
コンパイル時間 4,709 ms
コンパイル使用メモリ 177,408 KB
実行使用メモリ 14,748 KB
最終ジャッジ日時 2024-04-10 08:30:53
合計ジャッジ時間 27,453 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4,697 ms
8,192 KB
testcase_01 AC 1 ms
6,812 KB
testcase_02 AC 2 ms
6,940 KB
testcase_03 AC 2 ms
6,944 KB
testcase_04 TLE -
testcase_05 TLE -
testcase_06 WA -
testcase_07 AC 1,084 ms
8,192 KB
testcase_08 AC 2,873 ms
8,064 KB
testcase_09 AC 1 ms
6,944 KB
testcase_10 AC 1 ms
6,944 KB
testcase_11 AC 1 ms
6,940 KB
testcase_12 AC 2,899 ms
8,192 KB
testcase_13 TLE -
testcase_14 AC 2,890 ms
8,320 KB
testcase_15 AC 3 ms
6,944 KB
testcase_16 TLE -
testcase_17 AC 374 ms
8,064 KB
testcase_18 AC 1 ms
6,940 KB
testcase_19 AC 2,581 ms
8,192 KB
testcase_20 AC 8 ms
7,168 KB
testcase_21 AC 66 ms
8,192 KB
testcase_22 AC 1,530 ms
8,192 KB
testcase_23 AC 2,188 ms
8,064 KB
testcase_24 AC 205 ms
8,320 KB
testcase_25 AC 662 ms
8,192 KB
testcase_26 AC 556 ms
8,192 KB
testcase_27 AC 3,737 ms
7,936 KB
testcase_28 AC 3,767 ms
8,064 KB
testcase_29 AC 4,112 ms
8,320 KB
testcase_30 AC 488 ms
8,320 KB
testcase_31 AC 74 ms
8,192 KB
testcase_32 AC 72 ms
8,192 KB
testcase_33 AC 939 ms
8,192 KB
testcase_34 AC 2,644 ms
8,192 KB
testcase_35 AC 166 ms
7,936 KB
testcase_36 AC 1,136 ms
8,064 KB
testcase_37 AC 2 ms
6,948 KB
testcase_38 AC 76 ms
8,192 KB
testcase_39 AC 136 ms
8,192 KB
testcase_40 AC 9 ms
8,192 KB
testcase_41 AC 115 ms
8,192 KB
testcase_42 WA -
testcase_43 AC 1,172 ms
7,936 KB
testcase_44 AC 203 ms
7,936 KB
testcase_45 AC 656 ms
8,064 KB
testcase_46 AC 388 ms
8,192 KB
testcase_47 AC 2 ms
6,940 KB
testcase_48 AC 2 ms
6,940 KB
testcase_49 WA -
testcase_50 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

import Control.Applicative
main = do (a:b:c:_) <- map read . lines <$> getContents
          let d = lcm (lcm a b) c :: Integer
              e = f (d`div`a) (d`div`b) (d`div`c) (d`div`a)
          putStrLn $ (show d) ++ '/':show e
f a b c d | (a `mod` d) == (b `mod` d) && (b `mod` d) == (c `mod` d) = d
          | d <= 1 = 1
          | otherwise = f a b c (d-1)
0