結果

問題 No.1146 土偶Ⅰ
ユーザー mlihua09mlihua09
提出日時 2020-09-20 14:35:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 283 bytes
コンパイル時間 324 ms
コンパイル使用メモリ 86,968 KB
実行使用メモリ 76,372 KB
最終ジャッジ日時 2023-09-06 16:18:03
合計ジャッジ時間 4,105 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,152 KB
testcase_01 AC 74 ms
70,756 KB
testcase_02 AC 77 ms
70,772 KB
testcase_03 AC 87 ms
76,368 KB
testcase_04 AC 118 ms
76,220 KB
testcase_05 AC 91 ms
76,076 KB
testcase_06 AC 100 ms
76,108 KB
testcase_07 AC 114 ms
76,248 KB
testcase_08 AC 119 ms
76,372 KB
testcase_09 AC 95 ms
76,068 KB
testcase_10 AC 85 ms
76,164 KB
testcase_11 AC 99 ms
76,168 KB
testcase_12 AC 119 ms
76,244 KB
testcase_13 AC 75 ms
71,188 KB
testcase_14 AC 96 ms
76,060 KB
testcase_15 AC 115 ms
76,076 KB
testcase_16 AC 96 ms
76,220 KB
testcase_17 AC 75 ms
71,320 KB
testcase_18 AC 82 ms
75,544 KB
testcase_19 AC 93 ms
76,092 KB
testcase_20 AC 79 ms
75,688 KB
testcase_21 AC 86 ms
76,344 KB
testcase_22 AC 84 ms
76,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


from math import gcd

ans = 0
N = int(input())
A = [int(input()) for i in range(N)]

for i in range(N):
    
    for j in range(i):
        
        for k in range(j):
            
            if gcd(gcd(A[i], A[j]), A[k]) == 1:
                ans += 1
                
print(ans)
0