1 条题解

  • 0
    @ 2024-12-24 10:06:19

    C++ :

    #include<cstdio>
    int read()
    {
        char c=getchar();
        int x=0;
        while(c<'0'||c>'9')c=getchar();
        for(;c>='0'&&c<='9';c=getchar())x=x*10+c-'0';
        return x;
    }
    int main()
    {
    	int t,n;
    	t=read();
    	while(t--)
    		n=read(),printf("%d\n",(n>>1)*(n>>1)-(n&1?0:n>>1));
    	return 0;
    }
    
    
    • 1

    信息

    ID
    2682
    时间
    1000ms
    内存
    128MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者