結果

問題 No.358 も~っと!門松列
ユーザー jamad
提出日時 2017-08-07 00:49:03
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 1,000 ms
コード長 301 bytes
コンパイル時間 604 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-10-11 23:33:50
合計ジャッジ時間 1,797 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b,c=map(int,input().split())
M=max(a,b,c)
count=0
for p in range(1,M+10):
    B=[a%p,b%p,c%p]
    if len(set(B))!=3:continue
    mx=max(B)
    mn=min(B)
    if B[1]==mx or B[1]==mn: 
        
        if p>M:
            print('INF')
            exit()
        else:
            count+=1
print(count)
0