POJ 3210 : Coins

参考:https://blog.csdn.net/u010885899/article/details/46636523

http://kqwd.blog.163.com/blog/static/4122344820091041127552/

https://blog.csdn.net/nanchengbian/article/details/9077869

 1 #include <iostream>
 2 #include <cstdio>
 3 #include <cstring>
 4 using namespace std;
 5 int main()
 6 {
 7     int n;
 8     while (cin>>n&&n)
 9     {
10         if (n&1)//判断奇数
11         {
12             cout<<n-1<<endl;
13         }
14         else
15         {
16             cout<<"No Solution!"<<endl;
17         }
18     }
19 
20     return 0;
21 }

猜你喜欢

转载自www.cnblogs.com/hemeiwolong/p/9397689.html