結果
| 問題 | No.293 4>7の世界 |
| コンテスト | |
| ユーザー |
tak
|
| 提出日時 | 2019-06-26 01:03:43 |
| 言語 | F# (F# 10.0) |
| 結果 |
AC
|
| 実行時間 | 39 ms / 2,000 ms |
| コード長 | 896 bytes |
| 記録 | |
| コンパイル時間 | 6,534 ms |
| コンパイル使用メモリ | 201,908 KB |
| 実行使用メモリ | 31,556 KB |
| 最終ジャッジ日時 | 2026-03-08 10:40:02 |
| 合計ジャッジ時間 | 7,680 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 20 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (196 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net10.0/main.dll main -> /home/judge/data/code/bin/Release/net10.0/publish/
ソースコード
module Yuki
open System
let 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 true
elif a < b then false
else isA ax bx
| ax, [] -> failwith ""
| [], bx -> failwith ""
let a' = string a
let b' = string b
if a'.Length > b'.Length then
a
elif a'.Length < b'.Length then
b
else
let a'' = a'.ToCharArray() |> Array.map (string>>int64) |> Array.toList
let b'' = b'.ToCharArray() |> Array.map (string>>int64) |> Array.toList
if isA a'' b'' then
a
else
b
let A, B =
let t =
Console.ReadLine().Split()
|> Array.map int64
t.[0], t.[1]
solve A B
|> Console.WriteLine
tak