JS J组 玄学代码#1
  • 板块灌水区
  • 楼主Usstzqqch_Iroha
  • 当前回复0
  • 已保存回复0
  • 发布时间2022/10/30 00:22
  • 上次更新2023/10/27 04:59:18
查看原帖
JS J组 玄学代码#1
741676
Usstzqqch_Iroha楼主2022/10/30 00:22

代码1:来自JS-J00001的expr.cpp:

#include <bits/stdc++.h>
using namespace std;
int main()
{
	freopen("expr.in","r",stdin);
	freopen("expr.out","w",stdout);
	cout << 1 << endl << 43 << " " << 21;
	return 0;
}

摆烂了

代码2:仍然来自JS-J00001,pow.cpp:

#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
ull a,b,ans;
bool flag = false;
inline ull qpow(ull x,ull y)
{
	ull base = x,ans = 1;
	while (y)
	{
		if (y & 1)
			ans *= base;
		base *= base, y >>= 1;
		if (ans > (ull)1e9)
		{
			flag = true;
			return 0;
		}
	}
	return ans;
}

我看不懂但我很震撼

代码3:来自JS-J00002,pow.cpp:

	for(int i=1;i<=b;i++){
		res*=a;
		if(res>N||res<0){
			flag=false;
			break;
		}
	}
2022/10/30 00:22
加载中...