結果

問題 No.1146 土偶Ⅰ
ユーザー nohakai3nohakai3
提出日時 2022-07-19 15:57:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 218 ms / 2,000 ms
コード長 279 bytes
コンパイル時間 368 ms
コンパイル使用メモリ 10,712 KB
実行使用メモリ 36,232 KB
最終ジャッジ日時 2023-09-14 11:33:14
合計ジャッジ時間 3,399 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,188 KB
testcase_01 AC 17 ms
8,264 KB
testcase_02 AC 17 ms
8,240 KB
testcase_03 AC 40 ms
11,528 KB
testcase_04 AC 212 ms
35,456 KB
testcase_05 AC 44 ms
12,616 KB
testcase_06 AC 109 ms
21,356 KB
testcase_07 AC 169 ms
29,932 KB
testcase_08 AC 209 ms
35,408 KB
testcase_09 AC 75 ms
16,588 KB
testcase_10 AC 33 ms
10,612 KB
testcase_11 AC 95 ms
19,908 KB
testcase_12 AC 218 ms
36,232 KB
testcase_13 AC 16 ms
8,216 KB
testcase_14 AC 72 ms
16,240 KB
testcase_15 AC 173 ms
30,728 KB
testcase_16 AC 88 ms
18,484 KB
testcase_17 AC 16 ms
8,356 KB
testcase_18 AC 19 ms
8,612 KB
testcase_19 AC 78 ms
16,980 KB
testcase_20 AC 18 ms
8,548 KB
testcase_21 AC 33 ms
10,560 KB
testcase_22 AC 24 ms
9,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
l=[]
for i in range(n):
    s=int(input())
    l.append(s)

from itertools import combinations
c=list(combinations(l,3))
l2=[]
for x in c:
    x=list(x)
    l2.append(x)

from math import gcd
ans=0
for x in l2:
    if gcd(*x)==1:
        ans+=1
        
print(ans)
0