結果
| 問題 | No.358 も~っと!門松列 |
| コンテスト | |
| ユーザー |
maspy
|
| 提出日時 | 2020-01-17 14:52:57 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0) |
| 結果 |
AC
|
| 実行時間 | 95 ms / 1,000 ms |
| + 267µs | |
| コード長 | 491 bytes |
| 記録 | |
| コンパイル時間 | 309 ms |
| コンパイル使用メモリ | 21,540 KB |
| 実行使用メモリ | 15,868 KB |
| 最終ジャッジ日時 | 2026-07-29 22:53:28 |
| 合計ジャッジ時間 | 3,870 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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