結果
問題 | No.339 何人が回答したのか |
ユーザー |
![]() |
提出日時 | 2016-02-02 01:32:52 |
言語 | OCaml (5.2.1) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 477 bytes |
コンパイル時間 | 443 ms |
コンパイル使用メモリ | 19,696 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-08 23:44:42 |
合計ジャッジ時間 | 1,911 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 60 WA * 1 |
ソースコード
let integerize n fac = if n mod fac = 0 then if (n / fac) mod fac = 0 then 1 else fac else fac * fac let rec needs_ls n ls = if n > 0 then let ai = read_int () in needs_ls (n-1) (((integerize ai 2) * (integerize ai 5)) :: ls) else List.rev ls let rec max_item premax = function [] -> premax |hd :: tl -> max_item (max premax hd) tl let () = let n = read_int () in let ans = max_item 1 (needs_ls n []) in print_int ans; print_endline ""