結果
| 問題 |
No.892 タピオカ
|
| コンテスト | |
| ユーザー |
情報学生
|
| 提出日時 | 2019-09-27 21:39:21 |
| 言語 | Haskell (9.10.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 395 bytes |
| コンパイル時間 | 5,360 ms |
| コンパイル使用メモリ | 176,368 KB |
| 実行使用メモリ | 14,016 KB |
| 最終ジャッジ日時 | 2024-09-24 21:00:44 |
| 合計ジャッジ時間 | 7,872 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 1 TLE * 1 -- * 4 |
コンパイルメッセージ
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
ソースコード
-- 間違ったやり方
power :: Integer -> Integer -> Integer
power _ 0 = 1
power n 1 = n
power n x
| odd x = n * z * z
| otherwise = z * z
where z = power n (x `div` 2)
main :: IO ()
main = do
[a, x, b, y, c, z] <- map (read :: String -> Integer) . words <$> getLine
let d = power a x + power b y + power c z
putStrLn $ if even d then ":-)" else ":-("
情報学生