結果

問題 No.356 円周上を回る3つの動点の一致
ユーザー TatsunoTatsuno
提出日時 2016-04-01 23:52:43
言語 Haskell
(9.8.2)
結果
TLE  
実行時間 -
コード長 342 bytes
コンパイル時間 9,659 ms
コンパイル使用メモリ 176,000 KB
実行使用メモリ 8,320 KB
最終ジャッジ日時 2024-04-10 08:19:21
合計ジャッジ時間 24,124 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4,725 ms
7,936 KB
testcase_01 AC 1 ms
6,816 KB
testcase_02 AC 1 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,104 ms
8,192 KB
testcase_08 AC 2,874 ms
8,064 KB
testcase_09 AC 2 ms
6,944 KB
testcase_10 AC 1 ms
6,948 KB
testcase_11 AC 2 ms
6,940 KB
testcase_12 AC 2,943 ms
7,936 KB
testcase_13 TLE -
testcase_14 AC 2,921 ms
8,320 KB
testcase_15 AC 2 ms
6,940 KB
testcase_16 TLE -
testcase_17 AC 372 ms
7,936 KB
testcase_18 AC 1 ms
6,940 KB
testcase_19 AC 2,631 ms
7,936 KB
testcase_20 AC 7 ms
7,424 KB
testcase_21 AC 68 ms
7,936 KB
testcase_22 AC 1,539 ms
8,064 KB
testcase_23 AC 2,174 ms
7,936 KB
testcase_24 AC 213 ms
8,064 KB
testcase_25 AC 722 ms
8,064 KB
testcase_26 AC 572 ms
8,192 KB
testcase_27 AC 3,817 ms
8,192 KB
testcase_28 AC 3,834 ms
8,064 KB
testcase_29 AC 4,083 ms
8,320 KB
testcase_30 AC 507 ms
7,936 KB
testcase_31 AC 71 ms
8,064 KB
testcase_32 AC 74 ms
8,192 KB
testcase_33 AC 958 ms
8,192 KB
testcase_34 AC 2,677 ms
8,064 KB
testcase_35 AC 165 ms
8,192 KB
testcase_36 AC 1,136 ms
8,192 KB
testcase_37 AC 2 ms
6,940 KB
testcase_38 AC 75 ms
8,192 KB
testcase_39 AC 135 ms
8,320 KB
testcase_40 AC 9 ms
8,192 KB
testcase_41 AC 117 ms
7,936 KB
testcase_42 WA -
testcase_43 AC 1,171 ms
8,192 KB
testcase_44 AC 204 ms
8,192 KB
testcase_45 AC 657 ms
8,064 KB
testcase_46 AC 396 ms
8,192 KB
testcase_47 AC 2 ms
6,944 KB
testcase_48 AC 3 ms
6,944 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
          | otherwise = f a b c (d-1)
0