結果
| 問題 |
No.358 も~っと!門松列
|
| コンテスト | |
| ユーザー |
maspy
|
| 提出日時 | 2020-01-17 14:52:57 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 34 ms / 1,000 ms |
| コード長 | 491 bytes |
| コンパイル時間 | 99 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-06-25 15:51:16 |
| 合計ジャッジ時間 | 1,866 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 |
ソースコード
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
A = list(map(int,read().split()))
def is_kadomatsu(B):
if len(set(B)) != 3:
return False
if B[0]<B[1]<B[2]:
return False
if B[0]>B[1]>B[2]:
return False
return True
if is_kadomatsu(A):
print('INF')
exit()
answer = 0
for p in range(1,1001):
B = [x%p for x in A]
if is_kadomatsu(B):
answer += 1
print(answer)
maspy