結果

問題 No.1250 汝は倍数なりや?
ユーザー natoriusannatoriusan
提出日時 2023-08-01 19:54:09
言語 F#
(F# 4.0)
結果
AC  
実行時間 104 ms / 1,000 ms
コード長 256 bytes
コンパイル時間 7,707 ms
コンパイル使用メモリ 198,540 KB
実行使用メモリ 56,048 KB
最終ジャッジ日時 2024-04-19 18:55:28
合計ジャッジ時間 11,092 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
30,336 KB
testcase_01 AC 61 ms
30,336 KB
testcase_02 AC 62 ms
30,848 KB
testcase_03 AC 60 ms
30,336 KB
testcase_04 AC 59 ms
30,464 KB
testcase_05 AC 59 ms
30,336 KB
testcase_06 AC 59 ms
30,336 KB
testcase_07 AC 60 ms
30,464 KB
testcase_08 AC 58 ms
30,336 KB
testcase_09 AC 60 ms
30,720 KB
testcase_10 AC 58 ms
30,576 KB
testcase_11 AC 58 ms
30,588 KB
testcase_12 AC 58 ms
30,336 KB
testcase_13 AC 59 ms
30,324 KB
testcase_14 AC 61 ms
30,568 KB
testcase_15 AC 60 ms
30,592 KB
testcase_16 AC 60 ms
30,336 KB
testcase_17 AC 58 ms
30,336 KB
testcase_18 AC 58 ms
30,444 KB
testcase_19 AC 58 ms
30,336 KB
testcase_20 AC 60 ms
30,464 KB
testcase_21 AC 59 ms
30,336 KB
testcase_22 AC 59 ms
30,336 KB
testcase_23 AC 59 ms
30,712 KB
testcase_24 AC 60 ms
31,104 KB
testcase_25 AC 61 ms
30,720 KB
testcase_26 AC 59 ms
30,720 KB
testcase_27 AC 60 ms
30,828 KB
testcase_28 AC 61 ms
30,464 KB
testcase_29 AC 60 ms
30,592 KB
testcase_30 AC 60 ms
30,712 KB
testcase_31 AC 61 ms
30,592 KB
testcase_32 AC 60 ms
30,836 KB
testcase_33 AC 104 ms
56,048 KB
testcase_34 AC 84 ms
43,392 KB
testcase_35 AC 101 ms
53,236 KB
testcase_36 AC 103 ms
54,044 KB
testcase_37 AC 88 ms
44,288 KB
testcase_38 AC 92 ms
47,444 KB
testcase_39 AC 85 ms
43,648 KB
testcase_40 AC 84 ms
43,904 KB
testcase_41 AC 89 ms
48,932 KB
testcase_42 AC 80 ms
40,924 KB
testcase_43 AC 98 ms
53,744 KB
testcase_44 AC 78 ms
41,088 KB
testcase_45 AC 100 ms
54,212 KB
testcase_46 AC 73 ms
37,632 KB
testcase_47 AC 89 ms
49,052 KB
testcase_48 AC 61 ms
30,572 KB
testcase_49 AC 60 ms
30,336 KB
testcase_50 AC 60 ms
30,720 KB
testcase_51 AC 59 ms
30,336 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (231 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
/home/judge/data/code/Main.fs(1,5): warning FS0025: この式のパターン マッチが不完全です たとえば、値 '[|_; _; _|]' はパターンに含まれないケースを示す可能性があります。 [/home/judge/data/code/main.fsproj]
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

let [|n; h|] = stdin.ReadLine().Split " " |> Array.map int64
let a = stdin.ReadLine().Split " " |> Array.map int64

if n = 1L then
    a.[0] % h
else
    a |> Array.reduce (fun x y -> (x * y) % h)
|> (fun x -> printfn "%s" (if x = 0L then "YES" else "NO"))
0