結果

問題 No.1146 土偶Ⅰ
ユーザー ohanaohana
提出日時 2023-11-06 16:35:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 244 bytes
コンパイル時間 497 ms
コンパイル使用メモリ 81,848 KB
実行使用メモリ 75,744 KB
最終ジャッジ日時 2023-11-06 16:35:20
合計ジャッジ時間 2,929 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,768 KB
testcase_01 AC 34 ms
53,768 KB
testcase_02 AC 35 ms
53,768 KB
testcase_03 AC 51 ms
64,588 KB
testcase_04 AC 100 ms
75,744 KB
testcase_05 AC 53 ms
64,588 KB
testcase_06 AC 69 ms
70,732 KB
testcase_07 AC 91 ms
75,740 KB
testcase_08 AC 101 ms
75,744 KB
testcase_09 AC 62 ms
68,684 KB
testcase_10 AC 46 ms
62,384 KB
testcase_11 AC 67 ms
70,732 KB
testcase_12 AC 101 ms
75,740 KB
testcase_13 AC 35 ms
53,768 KB
testcase_14 AC 60 ms
68,684 KB
testcase_15 AC 91 ms
75,740 KB
testcase_16 AC 66 ms
70,732 KB
testcase_17 AC 34 ms
53,768 KB
testcase_18 AC 42 ms
60,312 KB
testcase_19 AC 62 ms
68,684 KB
testcase_20 AC 40 ms
59,992 KB
testcase_21 AC 47 ms
62,384 KB
testcase_22 AC 44 ms
62,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

n = int(input())

A = [int(input()) for i in range(n)]
ans = 0
for i in range(n):
    for j in range(i + 1, n):
        for k in range(j + 1, n):
            if math.gcd(A[i], A[j], A[k]) == 1:
                ans += 1

print(ans)
0