結果
問題 |
No.1146 土偶Ⅰ
|
ユーザー |
![]() |
提出日時 | 2022-07-19 15:57:22 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 252 ms / 2,000 ms |
コード長 | 279 bytes |
コンパイル時間 | 108 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 38,656 KB |
最終ジャッジ日時 | 2024-07-01 19:01:02 |
合計ジャッジ時間 | 3,414 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
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)