#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;
}
Title basic programming current amount of the check 7-19 (15 minutes)
Guess you like
Origin blog.csdn.net/qq_44458489/article/details/105400001
Recommended
Ranking