結果

問題 No.358 も~っと!門松列
コンテスト
ユーザー turner18_jp
提出日時 2018-03-16 03:54:07
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 351 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 375 ms
コンパイル使用メモリ 20,824 KB
実行使用メモリ 15,612 KB
最終ジャッジ日時 2026-05-28 06:17:07
合計ジャッジ時間 4,063 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 15 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

a, b, c = map(int, input().split())

def judge(a, b, c):
  if b > a and b > c or b < a and b < c and not a == c:
    return True
  else:
    return False

def f():
  count = 0
  if a == c:
    return '0'
  if judge(a, b, c):
    return 'INF'

  for i in range(1, max(a, b, c)+2):
    if judge(a%i, b%i, c%i):
      count += 1
  return count
print(f())
0