結果

問題 No.1146 土偶Ⅰ
ユーザー 👑 H20H20
提出日時 2022-01-27 23:29:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 234 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 82,484 KB
実行使用メモリ 61,824 KB
最終ジャッジ日時 2024-06-07 21:16:31
合計ジャッジ時間 2,367 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
52,352 KB
testcase_01 AC 33 ms
52,352 KB
testcase_02 AC 32 ms
52,224 KB
testcase_03 AC 48 ms
61,824 KB
testcase_04 AC 81 ms
61,440 KB
testcase_05 AC 49 ms
61,568 KB
testcase_06 AC 62 ms
61,312 KB
testcase_07 AC 72 ms
61,312 KB
testcase_08 AC 80 ms
61,696 KB
testcase_09 AC 54 ms
61,568 KB
testcase_10 AC 46 ms
61,056 KB
testcase_11 AC 59 ms
61,696 KB
testcase_12 AC 84 ms
61,568 KB
testcase_13 AC 32 ms
51,968 KB
testcase_14 AC 52 ms
61,056 KB
testcase_15 AC 73 ms
61,824 KB
testcase_16 AC 56 ms
61,312 KB
testcase_17 AC 33 ms
51,840 KB
testcase_18 AC 40 ms
60,032 KB
testcase_19 AC 54 ms
61,568 KB
testcase_20 AC 39 ms
59,136 KB
testcase_21 AC 45 ms
60,928 KB
testcase_22 AC 43 ms
60,800 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
N = int(input())
A = []
for i in range(N):
    A.append(int(input()))
ans = 0
for i in range(N):
    for j in range(i+1,N):
        for k in range(j+1,N):
            ans += math.gcd(math.gcd(A[i],A[k]),A[j])==1
print(ans)
0