結果

問題 No.358 も~っと!門松列
ユーザー ebicochineal
提出日時 2016-04-17 23:31:08
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 351 bytes
コンパイル時間 78 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-10-04 11:01:19
合計ジャッジ時間 1,472 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4 RE * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(b):
    return 1 if len(set(b))>2 else 0
    
def g(b):
    return b[1] < min(b[0], b[2]) or b[1] > max(b[0], b[2])
    
def h(b):
    if b[1] < b[0] and m(b): return 'INF'
    return sum(1 for x in range(max(b)+1) if  m([b[0]%x, b[1]%x, b[2]%x]))
    
    
def m(b):
    return f(b) and g(b)
    
a = list(map(int, input().split()))
print(h(a))
0