I'm thinking of a number. It is odd. It's between 1 and 100. It's higher than 20. It is smaller than the answer to 6 x 6. It is a multiple of 5. The sum of its digits is 7.
2026-03-30 00:18:10.1774829890
On
Figure this riddle out
77 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
3
There are 3 best solutions below
1
On
You can run the following program through coliru to brute force the answer:
#include <iostream>
int main()
{
int x;
for (x = 1;x <= 100;++x) // Between 1 and 100
{
if (x % 2 == 0) continue; // Not odd
if (x < 20) continue; // Not higher than 20
if (x > 6 * 6) continue; // Not less than the answer to 6*6
if (x % 5 != 0) continue; // Not a multiple of 5
if (x % 10 + x / 10 == 7) // Digits add up to 7
break;
}
std::cout << x;
}
Let the number be $x$.
It is higher than $20$ and smaller than $6\times6$, which means $20<x<36$.
It is a multiple of $5$, which means it is either $25$, $30$, or $35$.
The sum of its digits is $7$, which means it is $25$.
In Pyth, we write:
Try it online!
How it works: