結果
| 問題 | No.683 Two Operations No.3 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-12-31 11:30:21 |
| 言語 | F# (F# 10.0) |
| 結果 |
AC
|
| 実行時間 | 70 ms / 2,000 ms |
| コード長 | 380 bytes |
| 記録 | |
| コンパイル時間 | 9,263 ms |
| コンパイル使用メモリ | 208,868 KB |
| 実行使用メモリ | 32,384 KB |
| 最終ジャッジ日時 | 2026-04-28 11:46:49 |
| 合計ジャッジ時間 | 10,861 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (191 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net10.0/main.dll main -> /home/judge/data/code/bin/Release/net10.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"