結果

問題 No.358 も~っと!門松列
ユーザー hanorver
提出日時 2016-05-27 22:26:50
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 31 ms / 1,000 ms
コード長 296 bytes
コンパイル時間 315 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-10-07 16:36:49
合計ジャッジ時間 1,820 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

e=lambda a,b,c,d:a%d==b%d or b%d==c%d or a%d==c%d
a,b,c=map(int,input().split())
if e(a,b,c,10**9):print(0)
elif max(a,b,c)==b or min(a,b,c)==b:print('INF')
else:
 d=0
 for i in range(1,max(a,b,c)+1):
  f=a%i
  g=b%i
  h=c%i
  if not e(a,b,c,i) and (max(f,g,h)==g or min(f,g,h)==g):d+=1
 print(d)
0