結果
| 問題 |
No.358 も~っと!門松列
|
| コンテスト | |
| ユーザー |
iad_2889
|
| 提出日時 | 2019-05-21 02:19:41 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 34 ms / 1,000 ms |
| コード長 | 382 bytes |
| コンパイル時間 | 92 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-09-17 08:42:48 |
| 合計ジャッジ時間 | 1,616 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 |
ソースコード
def is_kadomatsu(lst):
if len(set(lst)) != 3:
return False
a2 = lst[1]
return a2 == max(lst) or a2 == min(lst)
A = list(map(int,input().split()))
if len(set(A)) != 3:
ans = 0
elif is_kadomatsu(A):
ans = "INF"
else:
ans = 0
scope = max(A)
for p in range(2,scope + 1):
if is_kadomatsu([x % p for x in A]):
ans+=1
print(ans)
iad_2889