結果
| 問題 | 
                            No.358 も~っと!門松列
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2022-03-17 21:30:38 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 50 ms / 1,000 ms | 
| コード長 | 346 bytes | 
| コンパイル時間 | 203 ms | 
| コンパイル使用メモリ | 82,040 KB | 
| 実行使用メモリ | 62,848 KB | 
| 最終ジャッジ日時 | 2024-10-01 20:30:04 | 
| 合計ジャッジ時間 | 1,978 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 23 | 
ソースコード
l = list(map(int,input().split()))
def calc(p):
    s = [i % p for i in l]
    ss =set(s)
    if len(ss) < 3:return False
    if max(s) == s[1] or min(s) == s[1]:
        return True
    else:
        return False
ans = 0
if calc(1001):
    print('INF')
else:
    for p in range(1,1001):
        if calc(p):
            ans += 1
    print(ans)