結果
問題 | No.293 4>7の世界 |
ユーザー |
![]() |
提出日時 | 2019-06-26 01:03:43 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 58 ms / 2,000 ms |
コード長 | 896 bytes |
コンパイル時間 | 9,615 ms |
コンパイル使用メモリ | 188,908 KB |
実行使用メモリ | 29,692 KB |
最終ジャッジ日時 | 2024-06-23 14:43:59 |
合計ジャッジ時間 | 9,710 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 20 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (255 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
module Yukiopen Systemlet solve a b =let rec isA ax bx =match ax, bx with| 7L :: _, 4L :: _ ->false| 4L :: _, 7L :: _ ->true| a :: ax, b :: bx ->if a > b then trueelif a < b then falseelse isA ax bx| ax, [] -> failwith ""| [], bx -> failwith ""let a' = string alet b' = string bif a'.Length > b'.Length thenaelif a'.Length < b'.Length thenbelselet a'' = a'.ToCharArray() |> Array.map (string>>int64) |> Array.toListlet b'' = b'.ToCharArray() |> Array.map (string>>int64) |> Array.toListif isA a'' b'' thenaelseblet A, B =let t =Console.ReadLine().Split()|> Array.map int64t.[0], t.[1]solve A B|> Console.WriteLine