結果
| 問題 |
No.356 円周上を回る3つの動点の一致
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-04-02 00:06:55 |
| 言語 | Haskell (9.10.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 365 bytes |
| コンパイル時間 | 3,772 ms |
| コンパイル使用メモリ | 177,536 KB |
| 実行使用メモリ | 13,768 KB |
| 最終ジャッジ日時 | 2024-10-02 10:12:36 |
| 合計ジャッジ時間 | 25,594 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 1 TLE * 2 -- * 45 |
コンパイルメッセージ
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
ソースコード
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)