結果
| 問題 |
No.358 も~っと!門松列
|
| コンテスト | |
| ユーザー |
双六
|
| 提出日時 | 2020-08-19 02:55:38 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 46 ms / 1,000 ms |
| コード長 | 637 bytes |
| コンパイル時間 | 354 ms |
| コンパイル使用メモリ | 82,308 KB |
| 実行使用メモリ | 54,144 KB |
| 最終ジャッジ日時 | 2024-10-12 03:29:41 |
| 合計ジャッジ時間 | 2,244 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 |
ソースコード
# import sys; input = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")
def getlist():
return list(map(int, input().split()))
def judge(A1, A2, A3):
if (A1 < A2 > A3 and A1 != A3) or (A1 > A2 < A3 and A1 != A3):
return 1
else:
return 0
#処理内容
def main():
A1, A2, A3 = getlist()
if judge(A1, A2, A3) == 1:
print("INF")
return
ans = 0
for i in range(1, 1001):
B1, B2, B3 = A1 % i, A2 % i, A3 % i
# if judge(B1, B2, B3) == 1:
# print(B1, B2, B3, i)
ans += judge(B1, B2, B3)
print(ans)
if __name__ == '__main__':
main()
双六