結果
| 問題 |
No.358 も~っと!門松列
|
| コンテスト | |
| ユーザー |
iad_2889
|
| 提出日時 | 2019-05-21 02:00:57 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 486 bytes |
| コンパイル時間 | 78 ms |
| コンパイル使用メモリ | 12,928 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2024-09-17 08:42:39 |
| 合計ジャッジ時間 | 1,570 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 WA * 13 |
ソースコード
def is_kadomatsu(lst):
if len(set(lst)) != 3:
return False
return min(lst) == lst[1] or max(lst) == lst[1]
lst = list(map(int,input().split()))
i = 2
cnt = 0
t_chain = 0
f_chain = 0
while True:
if is_kadomatsu([x % i for x in lst]):
cnt+=1
t_chain+=1
f_chain = 0
else:
f_chain+=1
t_chain = 0
if t_chain >= 100 or f_chain >= 100:
break
i+=1
if t_chain >= 100:
ans = "INF"
else:
ans = cnt
print(ans)
iad_2889