結果

問題 No.1146 土偶Ⅰ
ユーザー wolgnik
提出日時 2020-08-05 21:12:44
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 63 ms / 2,000 ms
コード長 236 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,774 ms
コンパイル使用メモリ 84,628 KB
実行使用メモリ 68,224 KB
最終ジャッジ日時 2026-04-06 06:53:01
合計ジャッジ時間 1,900 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys
from itertools import combinations as combi
from math import gcd
input = sys.stdin.readline
N = int(input())
a = [int(input()) for _ in range(N)]
res = 0
for c in combi(a, 3): res += gcd(gcd(c[0], c[1]), c[2]) == 1
print(res)
0