题目来源:http://acm.nyist.net/JudgeOnline/problem.php?pid=34
#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int main()
{
int a, b, c, i;
while(~scanf("%d %d %d", &a, &b, &c))
{
for(i = 10; i <= 100; ++i)
if(i%3 == a && i%5 == b && i % 7 == c)
{
printf("%d\n", i);
break;
}
}
return 0;
}