仔细分析就会看出规律,这道题真唬人。
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
typedef long long LL;
int main()
{
int t;
scanf("%d", &t);
while (t--)
{
LL p;
scanf("%lld", &p);
if (p==1)
{
cout<<12<<' '<<4<<endl;
cout<<1<<' '<<2<<' '<<3<<' '<<6<<endl;
}
else
{
LL k = 6*p;
printf ("%lld 3\n",k);
printf ("%lld %lld %lld\n",p,2*p,3*p);
}
}
return 0;
}