結果
問題 | No.98 円を描こう |
ユーザー | momen999 |
提出日時 | 2017-04-15 20:46:32 |
言語 | Haskell (9.8.2) |
結果 |
WA
|
実行時間 | - |
コード長 | 357 bytes |
コンパイル時間 | 1,474 ms |
コンパイル使用メモリ | 156,356 KB |
実行使用メモリ | 7,380 KB |
最終ジャッジ日時 | 2023-09-25 22:24:05 |
合計ジャッジ時間 | 2,284 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
7,152 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | AC | 3 ms
7,120 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | AC | 3 ms
7,252 KB |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 3 ms
7,320 KB |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.6.1/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
hankei r d2 | d2 == 0 = 1 | r' >= d2 = r * 2 + 1 | r > d2 = r * 2 | otherwise = hankei (r + 1) d2 where r' = r + 1 main = do str <- getLine let [x,y] = map read $ words str :: [Double] d2 = sqrt (x^2 + y^2) print $ truncate $ hankei (max (abs x) (abs y)) d2