結果
| 問題 |
No.356 円周上を回る3つの動点の一致
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-04-02 00:09:07 |
| 言語 | Haskell (9.10.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 343 bytes |
| コンパイル時間 | 4,975 ms |
| コンパイル使用メモリ | 175,616 KB |
| 実行使用メモリ | 16,000 KB |
| 最終ジャッジ日時 | 2024-10-02 10:14:14 |
| 合計ジャッジ時間 | 34,103 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 WA * 1 TLE * 1 -- * 34 |
コンパイルメッセージ
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`b)
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)