数学题(Vladik and fractions,743C)
2016-12-15 10:13
369 查看
哎,总觉得是搜索(记得埃及分数问题吗),或者是解方程。。。然后。。。
感觉自己天天跪数学题,亏自己还是数院的学生。。。
可能自己那天晚上太累了,连scanf都写不好了。
至少说还是学到了一些东西,以后做题就有更新的思路了。
代码
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
scanf("%d",&n);
if(n==1) puts("-1");
else printf("%d %d %d\n",n,n+1,n*(n+1));
return 0;
}
感觉自己天天跪数学题,亏自己还是数院的学生。。。
可能自己那天晚上太累了,连scanf都写不好了。
至少说还是学到了一些东西,以后做题就有更新的思路了。
代码
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
scanf("%d",&n);
if(n==1) puts("-1");
else printf("%d %d %d\n",n,n+1,n*(n+1));
return 0;
}
相关文章推荐
- 743C. Vladik and fractions codeforces
- codeforces 743 C. Vladik and fractions (数学)
- 【44.64%】【codeforces 743C】Vladik and fractions
- codeforce 743 C. Vladik and fractions (数学构造)
- 数学【CF743C】Vladik and fractions
- 【Codeforces 743C Vladik and fractions】
- Codeforces Round #384(Div. 2)C. Vladik and fractions【数学】
- Codeforces 743C-Vladik and fractions(构造)
- CodeForces 743C Vladik and fractions (数论)
- Codeforces Round #384 (Div. 2) C. Vladik and fractions 构造题
- codeforces 743-C. Vladik and fractions(构造)
- Codeforces Round #384 (Div. 2)-C. Vladik and fractions
- Codeforces Round #384 (Div. 2) C Vladik and fractions
- codeforces 743 C. Vladik and fractions(构造)
- Codeforces Round #384 (Div. 2) C. Vladik and fractions
- codeforces #384 Vladik and fractions (构造算法)
- Codeforces Round #384 (Div. 2) C. Vladik and fractions
- Codeforces Round #384 (Div. 2) C. Vladik and fractions
- Codeforces Round #384 (Div. 2) C. Vladik and fractions(构造题)
- Codeforces Round #384 (Div. 2) C. Vladik and fractions(构造题)