結果
| 問題 | No.320 眠れない夜に |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-12-13 01:23:08 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 421 bytes |
| 記録 | |
| コンパイル時間 | 134 ms |
| コンパイル使用メモリ | 77,992 KB |
| 最終ジャッジ日時 | 2025-12-03 18:33:01 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 RE * 1 |
| other | AC * 26 RE * 5 |
ソースコード
# -*- coding: utf-8 -*-
import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll
N, M = map(int, raw_input().split())
miss = [0]*(N + 1)
ans = -1
for i in xrange(3, N + 2):
a0, a1 = 1, 1
if i <= N: miss[i] = 1
for j in xrange(3, N + 1):
a0, a1 = a1, a1 + a0 - miss[j]
if a1 < M:
miss[i] = 0
elif a1 == M:
ans = sum(miss[3:])
break
print ans