結果
問題 | No.683 Two Operations No.3 |
ユーザー | 826814741_6 |
提出日時 | 2018-12-31 11:30:21 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 63 ms / 2,000 ms |
コード長 | 380 bytes |
コンパイル時間 | 14,534 ms |
コンパイル使用メモリ | 191,760 KB |
実行使用メモリ | 30,720 KB |
最終ジャッジ日時 | 2024-04-20 06:01:08 |
合計ジャッジ時間 | 12,505 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 59 ms
30,336 KB |
testcase_01 | AC | 58 ms
30,464 KB |
testcase_02 | AC | 59 ms
30,464 KB |
testcase_03 | AC | 58 ms
30,464 KB |
testcase_04 | AC | 60 ms
30,464 KB |
testcase_05 | AC | 59 ms
30,720 KB |
testcase_06 | AC | 57 ms
30,464 KB |
testcase_07 | AC | 57 ms
30,720 KB |
testcase_08 | AC | 57 ms
30,464 KB |
testcase_09 | AC | 57 ms
30,336 KB |
testcase_10 | AC | 57 ms
30,336 KB |
testcase_11 | AC | 58 ms
30,336 KB |
testcase_12 | AC | 58 ms
30,452 KB |
testcase_13 | AC | 58 ms
30,336 KB |
testcase_14 | AC | 58 ms
30,464 KB |
testcase_15 | AC | 63 ms
30,464 KB |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (327 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/
ソースコード
let rec f a b = if a=0L || b=0L then true else match (a%2L,b%2L) with | (1L,1L) -> false | (0L,1L) -> f (a/2L) (b-1L) | (1L,0L) -> f (a-1L) (b/2L) | (_,_) -> (f (a/2L) (b-1L)) || (f (a-1L) (b/2L)) stdin.ReadLine().Split(' ') |> Array.map int64 |> fun a -> f a.[0] a.[1] |> fun b -> if b then "Yes" else "No" |> printfn "%s"