CF225E.Unsolvable

提高+/省选-

通过率:0%

时间限制:2.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Consider the following equation:

where sign [a] represents the integer part of number a.

Let's find all integer z (z > 0), for which this equation is unsolvable in positive integers. The phrase "unsolvable in positive integers" means that there are no such positive integers x and y (x, y > 0), for which the given above equation holds.

Let's write out all such z in the increasing order: _z_1, _z_2, _z_3, and so on (z__i < z__i + 1). Your task is: given the number n, find the number z__n.

考虑如下方程:

其中符号 [a] 表示数 (a) 的整数部分(即向下取整)。

试找出所有正整数 (z)(即 (z > 0)),使得该方程在正整数范围内无解。所谓“在正整数范围内无解”,是指不存在正整数 (x) 和 (y)(即 (x > 0),(y > 0)),使得上述方程成立。

将所有满足条件的 (z) 按升序排列:(z_1,,z_2,,z_3,,\ldots)(即 (z_i < z_{i+1}))。你的任务是:给定正整数 (n),求出 (z_n)。

输入格式

The first line contains a single integer n (1 ≤ n ≤ 40).

第一行包含一个整数 nn(1≤n≤401 \leq n \leq 40)。

输出格式

Print a single integer — the number z__n modulo 1000000007 (109 + 7). It is guaranteed that the answer exists.

输出一个整数——即数 znz_n 对 10000000071000000007(109+710^9 + 7)取模的结果。保证答案存在。

输入输出样例

  • 输入#1

    1

    输出#1

    1
  • 输入#2

    2

    输出#2

    3
  • 输入#3

    3

    输出#3

    15

输入解题思路,AI测评打分。不知道怎么写?

首页