結果

問題 No.358 も~っと!門松列
ユーザー 👑 KazunKazun
提出日時 2021-07-09 01:00:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 73 ms / 1,000 ms
コード長 274 bytes
コンパイル時間 275 ms
コンパイル使用メモリ 87,092 KB
実行使用メモリ 71,616 KB
最終ジャッジ日時 2023-09-14 06:14:07
合計ジャッジ時間 3,232 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,376 KB
testcase_01 AC 69 ms
71,288 KB
testcase_02 AC 70 ms
71,328 KB
testcase_03 AC 70 ms
71,368 KB
testcase_04 AC 70 ms
71,376 KB
testcase_05 AC 70 ms
71,584 KB
testcase_06 AC 70 ms
71,420 KB
testcase_07 AC 73 ms
71,352 KB
testcase_08 AC 70 ms
71,556 KB
testcase_09 AC 72 ms
71,356 KB
testcase_10 AC 71 ms
71,408 KB
testcase_11 AC 70 ms
71,388 KB
testcase_12 AC 72 ms
71,276 KB
testcase_13 AC 70 ms
71,580 KB
testcase_14 AC 70 ms
71,176 KB
testcase_15 AC 71 ms
71,520 KB
testcase_16 AC 68 ms
71,316 KB
testcase_17 AC 70 ms
71,448 KB
testcase_18 AC 70 ms
71,340 KB
testcase_19 AC 70 ms
71,408 KB
testcase_20 AC 70 ms
71,416 KB
testcase_21 AC 71 ms
71,328 KB
testcase_22 AC 72 ms
71,616 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def is_kadomatsu(a,b,c):
    if a==b or b==c or c==a:
        return False
    return a<b>c or a>b<c

A,B,C=map(int,input().split())
if is_kadomatsu(A,B,C):
    exit(print("INF"))

X=0
for p in range(1,max(A,B,C)+2):
    X+=1 if is_kadomatsu(A%p, B%p, C%p) else 0

print(X)
0