結果

問題 No.1146 土偶Ⅰ
ユーザー pluto77pluto77
提出日時 2020-09-30 09:45:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 223 bytes
コンパイル時間 113 ms
コンパイル使用メモリ 10,704 KB
実行使用メモリ 8,048 KB
最終ジャッジ日時 2023-09-19 03:51:18
合計ジャッジ時間 2,518 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,900 KB
testcase_01 AC 17 ms
7,928 KB
testcase_02 AC 17 ms
7,956 KB
testcase_03 AC 32 ms
7,964 KB
testcase_04 AC 120 ms
7,896 KB
testcase_05 AC 34 ms
7,888 KB
testcase_06 AC 68 ms
7,956 KB
testcase_07 AC 101 ms
7,952 KB
testcase_08 AC 120 ms
7,888 KB
testcase_09 AC 50 ms
7,936 KB
testcase_10 AC 27 ms
7,888 KB
testcase_11 AC 62 ms
7,960 KB
testcase_12 AC 125 ms
7,892 KB
testcase_13 AC 17 ms
7,944 KB
testcase_14 AC 48 ms
7,948 KB
testcase_15 AC 104 ms
8,048 KB
testcase_16 AC 56 ms
7,964 KB
testcase_17 AC 17 ms
7,924 KB
testcase_18 AC 18 ms
7,896 KB
testcase_19 AC 50 ms
7,964 KB
testcase_20 AC 17 ms
8,032 KB
testcase_21 AC 26 ms
7,848 KB
testcase_22 AC 22 ms
8,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki1146
from math import *
n=int(input())
a=[]
for i in range(n):
 a.append(int(input()))
cnt=0
for i in range(n):
 for j in range(i+1,n):
  for k in range(j+1,n):
   if gcd(a[i],gcd(a[j],a[k]))==1:
    cnt+=1
print(cnt)
0