結果
問題 | No.358 も~っと!門松列 |
ユーザー |
![]() |
提出日時 | 2018-03-16 03:56:59 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 28 ms / 1,000 ms |
コード長 | 356 bytes |
コンパイル時間 | 98 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-12-21 14:06:56 |
合計ジャッジ時間 | 1,325 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 |
ソースコード
a, b, c = map(int, input().split()) def judge(a, b, c): if b > a and b > c and not a == 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, 1001): if judge(a%i, b%i, c%i): count += 1 return count print(f())