結果

問題 No.1146 土偶Ⅰ
ユーザー HAGI_TARO
提出日時 2021-10-28 10:05:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 92 ms / 2,000 ms
コード長 199 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 70,016 KB
最終ジャッジ日時 2024-10-07 07:56:53
合計ジャッジ時間 2,567 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
import math
n = int(input())
A = [int(input()) for _ in range(n)]
ans = 0
for a,b,c in itertools.combinations(A,3):
    if math.gcd(math.gcd(a,b),c) == 1:
        ans += 1
print(ans)
0