結果

問題 No.358 も~っと!門松列
ユーザー ああいいああいい
提出日時 2022-03-17 21:30:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 46 ms / 1,000 ms
コード長 346 bytes
コンパイル時間 261 ms
コンパイル使用メモリ 82,424 KB
実行使用メモリ 64,268 KB
最終ジャッジ日時 2024-04-09 20:14:38
合計ジャッジ時間 2,025 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
62,280 KB
testcase_01 AC 34 ms
52,508 KB
testcase_02 AC 43 ms
62,808 KB
testcase_03 AC 39 ms
60,732 KB
testcase_04 AC 44 ms
62,976 KB
testcase_05 AC 45 ms
62,828 KB
testcase_06 AC 39 ms
59,920 KB
testcase_07 AC 45 ms
63,292 KB
testcase_08 AC 41 ms
59,568 KB
testcase_09 AC 44 ms
62,272 KB
testcase_10 AC 40 ms
60,792 KB
testcase_11 AC 46 ms
63,508 KB
testcase_12 AC 42 ms
61,368 KB
testcase_13 AC 34 ms
53,004 KB
testcase_14 AC 46 ms
64,268 KB
testcase_15 AC 34 ms
52,480 KB
testcase_16 AC 34 ms
52,308 KB
testcase_17 AC 34 ms
53,812 KB
testcase_18 AC 33 ms
53,068 KB
testcase_19 AC 34 ms
52,432 KB
testcase_20 AC 46 ms
63,816 KB
testcase_21 AC 35 ms
52,928 KB
testcase_22 AC 46 ms
63,048 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0