【发布时间】:2020-01-12 02:14:02
【问题描述】:
问题链接:http://codeforces.com/problemset/problem/483/A
你需要找到三个数(a, b, c),使得l ≤ a
我想知道解决这个问题的想法。
编辑:
这是我的尝试:
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
int l, r, i, c;
cin >> l >> r;
c = r - l;
if(c <= 50)
{
if(c >= 2)
{
for(i = l; i <= r; i++)
{
if(i % 2 == 0)
{
cout << i << " " << i+1 << " " << i+2 << endl;
break;
}
}
}
else if(c <= 1)
{
cout << "-1" << endl;
}
}
}
我的代码有什么问题?网站上的错误信息是
Probably, the solution is executed with error 'uninitiaized value usage' on the line 10
【问题讨论】:
标签: math functional-programming brute-force number-theory