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

HDU5924 Mr. Frog’s Problem

时间:2017-03-24 13:59:53      阅读:107      评论:0      收藏:0      [点我收藏+]

标签:class   log   print   ase   under   http   数论   turn   problem   

 1 /*
 2  HDU5924 Mr. Frog’s Problem
 3  http://acm.hdu.edu.cn/showproblem.php?pid=5924
 4  数论
 5  *
 6  */
 7 #include <cstdio>
 8 int main()
 9 {
10     long long a,b;
11     int t;
12     scanf("%d",&t);
13     for(int k=1;k<=t;k++)
14     {
15         scanf("%lld%lld",&a,&b);
16         printf("Case #%d:\n",k);
17         if(a==b)
18         {
19             printf("1\n");
20             printf("%lld %lld\n",a,b);
21         }
22         else
23         {
24             printf("2\n");
25             if(a<b)
26             {
27                 printf("%lld %lld\n",a,b);
28                 printf("%lld %lld\n",b,a);
29             }
30             else
31             {
32                 printf("%lld %lld\n%lld %lld\n",b,a,a,b);
33             }
34         }
35 
36     }
37     return 0;
38 }

 

HDU5924 Mr. Frog’s Problem

标签:class   log   print   ase   under   http   数论   turn   problem   

原文地址:http://www.cnblogs.com/BBBob/p/6610761.html

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