結果

問題 No.1146 土偶Ⅰ
ユーザー gemmarogemmaro
提出日時 2020-09-17 07:53:19
言語 Ruby
(3.3.0)
結果
AC  
実行時間 201 ms / 2,000 ms
コード長 161 bytes
コンパイル時間 425 ms
コンパイル使用メモリ 11,336 KB
実行使用メモリ 22,016 KB
最終ジャッジ日時 2023-09-04 07:03:43
合計ジャッジ時間 4,866 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
15,276 KB
testcase_01 AC 84 ms
15,292 KB
testcase_02 AC 84 ms
15,096 KB
testcase_03 AC 97 ms
15,716 KB
testcase_04 AC 200 ms
21,776 KB
testcase_05 AC 101 ms
16,036 KB
testcase_06 AC 138 ms
18,336 KB
testcase_07 AC 177 ms
20,420 KB
testcase_08 AC 200 ms
21,832 KB
testcase_09 AC 119 ms
17,220 KB
testcase_10 AC 95 ms
15,280 KB
testcase_11 AC 131 ms
17,932 KB
testcase_12 AC 201 ms
22,016 KB
testcase_13 AC 86 ms
15,096 KB
testcase_14 AC 119 ms
17,112 KB
testcase_15 AC 176 ms
20,492 KB
testcase_16 AC 127 ms
17,532 KB
testcase_17 AC 83 ms
15,332 KB
testcase_18 AC 87 ms
15,196 KB
testcase_19 AC 121 ms
17,040 KB
testcase_20 AC 86 ms
15,276 KB
testcase_21 AC 94 ms
15,204 KB
testcase_22 AC 89 ms
15,168 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

# frozen_string_literal: true

def solve
  A.combination(3).select { |a| a.reduce(:gcd) == 1 }.size
end

N = gets.to_i
A = N.times.map { gets.to_i }

puts solve
0