传说中到找规律题QAQ 扒代码大法好
#include<iostream>
#include<cstdio>
using namespace std;
long long p,q;
int main()
{
scanf("%lld%lld",&p,&q);
if (p==q) p++;
cout << (p>>1)*(q>>1);
return 0;
}
本文分享了一道C++编程中的找规律题目的解决方案。通过简单的条件判断和位运算实现,该程序能够根据输入的两个长整型数p和q,输出特定的计算结果。
传说中到找规律题QAQ 扒代码大法好
#include<iostream>
#include<cstdio>
using namespace std;
long long p,q;
int main()
{
scanf("%lld%lld",&p,&q);
if (p==q) p++;
cout << (p>>1)*(q>>1);
return 0;
}
1243

被折叠的 条评论
为什么被折叠?