2020-05-28 06:00:02 +08:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* @brief A buzz number is a number that is either divisible by 7 or has last
|
|
|
|
* digit as 7.
|
|
|
|
*/
|
2017-12-24 01:30:49 +08:00
|
|
|
#include <iostream>
|
2020-05-28 06:00:02 +08:00
|
|
|
|
|
|
|
/** main function */
|
2020-05-30 07:26:30 +08:00
|
|
|
int main()
|
|
|
|
{
|
2020-05-28 06:00:02 +08:00
|
|
|
int n, t;
|
|
|
|
std::cin >> t;
|
2020-05-30 07:26:30 +08:00
|
|
|
while (t--)
|
|
|
|
{
|
2020-05-28 06:00:02 +08:00
|
|
|
std::cin >> n;
|
|
|
|
if ((n % 7 == 0) || (n % 10 == 7))
|
|
|
|
std::cout << n << " is a buzz number" << std::endl;
|
|
|
|
else
|
|
|
|
std::cout << n << " is not a buzz number" << std::endl;
|
|
|
|
}
|
|
|
|
return 0;
|
2017-12-24 01:30:49 +08:00
|
|
|
}
|