結果

問題 No.358 も~っと!門松列
ユーザー 👑 yumechiyumechi
提出日時 2016-04-25 00:07:26
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 342 bytes
コンパイル時間 132 ms
コンパイル使用メモリ 82,548 KB
実行使用メモリ 62,928 KB
最終ジャッジ日時 2024-04-15 04:25:30
合計ジャッジ時間 1,753 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 35 ms
52,916 KB
testcase_02 WA -
testcase_03 AC 40 ms
58,168 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 41 ms
59,196 KB
testcase_07 WA -
testcase_08 AC 40 ms
59,452 KB
testcase_09 WA -
testcase_10 AC 36 ms
52,744 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 38 ms
58,052 KB
testcase_14 WA -
testcase_15 AC 43 ms
61,900 KB
testcase_16 AC 44 ms
61,256 KB
testcase_17 AC 41 ms
59,372 KB
testcase_18 AC 44 ms
61,036 KB
testcase_19 AC 43 ms
61,380 KB
testcase_20 WA -
testcase_21 AC 42 ms
61,292 KB
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

a = [int(i) for i in input().split()]
res = 0
for i in range(1, max(a)+1):
    b = [e % i for e in a]
    if len(a) != len(set(a)):
        continue
    if b[1] == max(b) or b[1] == min(b):
        res += 1
b = [e % (max(a)+1) for e in a]
if len(b) == len(set(b)) and (b[1] == max(b) or b[1] == min(b)):
    print("INF")
else:
    print(res)
0