結果

問題 No.1250 汝は倍数なりや?
ユーザー natoriusannatoriusan
提出日時 2023-08-01 19:53:35
言語 F#
(F# 4.0)
結果
AC  
実行時間 105 ms / 1,000 ms
コード長 255 bytes
コンパイル時間 6,440 ms
コンパイル使用メモリ 197,788 KB
実行使用メモリ 55,804 KB
最終ジャッジ日時 2024-04-19 18:55:07
合計ジャッジ時間 11,340 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
30,720 KB
testcase_01 AC 58 ms
30,592 KB
testcase_02 AC 61 ms
30,336 KB
testcase_03 AC 58 ms
30,464 KB
testcase_04 AC 57 ms
30,336 KB
testcase_05 AC 57 ms
30,336 KB
testcase_06 AC 57 ms
30,336 KB
testcase_07 AC 59 ms
30,336 KB
testcase_08 AC 58 ms
30,592 KB
testcase_09 AC 58 ms
30,336 KB
testcase_10 AC 58 ms
30,444 KB
testcase_11 AC 60 ms
30,848 KB
testcase_12 AC 58 ms
30,720 KB
testcase_13 AC 59 ms
30,336 KB
testcase_14 AC 60 ms
30,464 KB
testcase_15 AC 61 ms
30,720 KB
testcase_16 AC 62 ms
30,464 KB
testcase_17 AC 58 ms
30,848 KB
testcase_18 AC 58 ms
30,464 KB
testcase_19 AC 60 ms
30,592 KB
testcase_20 AC 60 ms
30,464 KB
testcase_21 AC 58 ms
30,464 KB
testcase_22 AC 59 ms
30,336 KB
testcase_23 AC 62 ms
30,968 KB
testcase_24 AC 62 ms
30,720 KB
testcase_25 AC 61 ms
30,720 KB
testcase_26 AC 59 ms
30,592 KB
testcase_27 AC 61 ms
30,720 KB
testcase_28 AC 62 ms
30,464 KB
testcase_29 AC 67 ms
30,848 KB
testcase_30 AC 63 ms
30,720 KB
testcase_31 AC 64 ms
30,848 KB
testcase_32 AC 60 ms
31,104 KB
testcase_33 AC 103 ms
55,804 KB
testcase_34 AC 83 ms
43,520 KB
testcase_35 AC 98 ms
53,496 KB
testcase_36 AC 100 ms
54,172 KB
testcase_37 AC 85 ms
44,544 KB
testcase_38 AC 87 ms
47,564 KB
testcase_39 AC 86 ms
43,648 KB
testcase_40 AC 84 ms
43,904 KB
testcase_41 AC 92 ms
49,060 KB
testcase_42 AC 82 ms
41,208 KB
testcase_43 AC 99 ms
53,868 KB
testcase_44 AC 80 ms
40,960 KB
testcase_45 AC 105 ms
54,208 KB
testcase_46 AC 72 ms
37,760 KB
testcase_47 AC 88 ms
48,928 KB
testcase_48 AC 61 ms
30,336 KB
testcase_49 AC 61 ms
30,464 KB
testcase_50 AC 61 ms
30,336 KB
testcase_51 AC 59 ms
30,336 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (219 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 = 1 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