結果
| 問題 | No.358 も~っと!門松列 |
| コンテスト | |
| ユーザー |
JunOnuma
|
| 提出日時 | 2017-06-12 16:00:57 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 78 ms / 1,000 ms |
| コード長 | 370 bytes |
| 記録 | |
| コンパイル時間 | 183 ms |
| コンパイル使用メモリ | 77,888 KB |
| 最終ジャッジ日時 | 2025-12-04 00:03:51 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 |
ソースコード
a,b,c = map(int, raw_input().split())
if a == b or b == c or c == a:
print 0
elif (b > a and b > c) or (b < a and b < c):
print 'INF'
else:
m = max(a,max(b,c))
ct = 0
for d in range(3,m+1):
x = a % d
y = b % d
z = c % d
if (y > x and y > z and x != z) or (y < x and y < z and x != z):
ct += 1
print ct
JunOnuma