码迷,mamicode.com
首页 > 其他好文 > 详细

POJ 3210 : Coins

时间:2018-07-31 21:36:33      阅读:103      评论:0      收藏:0      [点我收藏+]

标签:while   stream   targe   net   std   end   ace   coin   solution   

参考: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 }

 

POJ 3210 : Coins

标签:while   stream   targe   net   std   end   ace   coin   solution   

原文地址:https://www.cnblogs.com/hemeiwolong/p/9397689.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!