挑战全网最短时间(229ms)
查看原帖
挑战全网最短时间(229ms)
1243618
Jokersheng楼主2024/8/22 18:51
#include <bits/stdc++.h>
using namespace std;

int n,k;

int main(){
	scanf("%d",&n);
	while(n--){
		scanf("%d",&k);
		if(int(sqrt((k-1)*2))*int(sqrt((k-1)*2)+1)==(k-1)*2){
			printf("1\n");
			continue;
		}
		printf("0\n");
	}
	return 0;
}

确定不是蹭流量,是真心想比。 证据1 ,证据2.

2024/8/22 18:51
加载中...