#include <cstdio>
#include <iostream>
using namespace std;
int y, f, n;
int main()
{
scanf("%d", &n);
y = (98 - n) / 3;
f = 2 * y + 1;
if ((98 - n) % 3 == 0)
printf("%d.%d\n", y, f);
else
{
for (int i = 0; i < 100; i++)
{
for (int j = 0; j < 100; j++)
{
if ((2 * i * 100 + 2 * j) == (j * 100 + i - n))
{
printf("%d.%d\n", i, j);
return 0;
}
}
}
printf("No Solution\n");
}
return 0;
}
基础编程题目集 7-19 支票面额 (15分)
猜你喜欢
转载自blog.csdn.net/qq_44458489/article/details/105400001
今日推荐
周排行