結果
| 問題 |
No.358 も~っと!門松列
|
| コンテスト | |
| ユーザー |
_KingdomOfMoray
|
| 提出日時 | 2019-12-26 10:17:24 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 31 ms / 1,000 ms |
| コード長 | 682 bytes |
| コンパイル時間 | 248 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-10-03 04:24:51 |
| 合計ジャッジ時間 | 1,703 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 |
ソースコード
a_list = list(map(int,input().split()))
kadomatsu = 0
count = 0
def judge_kadomatsu(list_0):
flag = 0
if (list_0[0] - list_0[1] != 0) and (list_0[1] - list_0[2] != 0) and (list_0[2] - list_0[0] != 0):
if list_0.index(min(list_0)) == 1 or list_0.index(max(list_0)) == 1:
flag = 1
return flag
kadomatsu = judge_kadomatsu(a_list)
if kadomatsu == 0:
for i in range(1000):
devisor = i + 1
cur_list = [a_list[0] % devisor, a_list[1] % devisor, a_list[2] % devisor]
if judge_kadomatsu(cur_list) == 1:
count += 1
if kadomatsu == 1:
print('INF')
else:
print(count)
_KingdomOfMoray