結果

問題 No.358 も~っと!門松列
ユーザー nbisco
提出日時 2017-01-14 10:44:58
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 28 ms / 1,000 ms
コード長 384 bytes
コンパイル時間 352 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-12-21 12:41:24
合計ジャッジ時間 1,670 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

def is_kadom(a,b,c):
    if not (a != b and a != c and b != c):
        return False
    if max(a,b,c) == b or min(a,b,c) == b:
        return True
    return False


a, b, c = map(int, input().strip().split(" "))

if is_kadom(a,b,c):
    print("INF")
else:
    count = 0
    for i in range(1, max(a,b,c)+1):
        if is_kadom(a%i, b%i, c%i):
            count += 1
    print(count)
0