2016CCPC东北地区大学生程序设计竞赛 1003 HDU5924

链接http://acm.hdu.edu.cn/showproblem.php?pid=5924

题意:根据公式求C,D

解法:打表找规律

#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
    int t,cnt=1;
    scanf("%d",&t);
    while(t--)
    {
        ll a,b;
        scanf("%I64d%I64d",&a,&b);
        printf("Case #%d:
",cnt++);
        if(a==b)
        {
            puts("1");
            printf("%I64d %I64d
",a,b);
        }
        else
        {
            puts("2");
            printf("%I64d %I64d
",a,b);
            printf("%I64d %I64d
",b,a);
        }
    }

    return 0;
}

  

原文地址:https://www.cnblogs.com/yinghualuowu/p/5934239.html