結果
問題 | No.368 LCM of K-products |
ユーザー | mai |
提出日時 | 2018-02-02 00:12:14 |
言語 | Ruby (3.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 220 bytes |
コンパイル時間 | 78 ms |
コンパイル使用メモリ | 11,436 KB |
実行使用メモリ | 16,920 KB |
最終ジャッジ日時 | 2023-08-28 18:04:32 |
合計ジャッジ時間 | 5,100 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 85 ms
16,616 KB |
testcase_02 | AC | 86 ms
16,664 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | AC | 87 ms
16,884 KB |
testcase_06 | AC | 83 ms
15,148 KB |
testcase_07 | AC | 82 ms
15,148 KB |
testcase_08 | AC | 84 ms
15,124 KB |
testcase_09 | AC | 82 ms
15,040 KB |
testcase_10 | AC | 81 ms
15,140 KB |
testcase_11 | AC | 82 ms
15,128 KB |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | AC | 83 ms
15,280 KB |
testcase_24 | AC | 82 ms
15,124 KB |
testcase_25 | WA | - |
testcase_26 | AC | 82 ms
15,036 KB |
testcase_27 | WA | - |
testcase_28 | AC | 80 ms
15,176 KB |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | AC | 81 ms
15,072 KB |
testcase_32 | WA | - |
testcase_33 | AC | 86 ms
15,380 KB |
testcase_34 | WA | - |
コンパイルメッセージ
Syntax OK
ソースコード
def ascan; gets.split.map(&:to_i);end MD = 1000000007 N,K = ascan aa = ascan.sort #p aa.combination(K).map{|z| z.reduce(:*)}.reduce(:lcm)%MD aa << aa.pop(K).reduce(:*) p aa.reduce(:lcm)%MD # case # 3 2 # 100 11 10