結果

問題 No.358 も~っと!門松列
ユーザー syunsukesyunsuke
提出日時 2019-06-06 00:01:56
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 30 ms / 1,000 ms
コード長 337 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 11,880 KB
実行使用メモリ 10,104 KB
最終ジャッジ日時 2023-10-23 20:08:00
合計ジャッジ時間 1,802 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,104 KB
testcase_01 AC 30 ms
10,104 KB
testcase_02 AC 29 ms
10,104 KB
testcase_03 AC 28 ms
10,104 KB
testcase_04 AC 27 ms
10,104 KB
testcase_05 AC 27 ms
10,104 KB
testcase_06 AC 27 ms
10,104 KB
testcase_07 AC 27 ms
10,104 KB
testcase_08 AC 27 ms
10,104 KB
testcase_09 AC 28 ms
10,104 KB
testcase_10 AC 27 ms
10,104 KB
testcase_11 AC 28 ms
10,104 KB
testcase_12 AC 27 ms
10,104 KB
testcase_13 AC 27 ms
10,104 KB
testcase_14 AC 27 ms
10,104 KB
testcase_15 AC 27 ms
10,104 KB
testcase_16 AC 27 ms
10,104 KB
testcase_17 AC 27 ms
10,104 KB
testcase_18 AC 28 ms
10,104 KB
testcase_19 AC 27 ms
10,104 KB
testcase_20 AC 28 ms
10,104 KB
testcase_21 AC 27 ms
10,104 KB
testcase_22 AC 28 ms
10,104 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A,B,C=map(int,input().split())
ans=0
if A==B or B==C or C==A:
    print(0)
    exit()
elif B==min(A,B,C) or B==max(A,B,C):
    print("INF")
    exit()
else:
    for i in range(1,max(A,B,C)+1):
        a=A%i
        b=B%i
        c=C%i
        if b>a>c or b>c>a or a>c>b or c>a>b:
            ans+=1
            #print(a,b,c,i)
print(ans)
0