5 条题解

  • 2
    @ 2025-5-11 10:54:59

    114514级难度,建议挑战。

    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int n;
    	cin>>n;
      cout<<n*4;
      return 0;
    }
    
    • 0
      @ 2025-9-14 9:49:48

      这个题解区没有一片像样的题解

      好久没有做正方形的周长这么难的题目了。
      注意到答案就是 n×4n\times 4 ,但是题目没有说明 nn 的取值范围,所以这题保险起见要用高精度:
      (鄙人不才,见笑了)

      #include<iostream>
      #define QwQ return 0;
      using namespace std;
      int bi[1000000];
      string str;
      int main(){
      	cin>>str;
      	for(int i=str.size()+1;i>1;i--){
      		bi[i]=str[i-2]-48;
      	}
      	for(int i=str.size()+1;i>1;i--){
      		bi[i]*=4;
      		bi[i]+=bi[i-1]%10;
      		bi[i-1]%=10;
      	}
      	bool start=false;
      	for(int i=1;i<=str.size()+1;i++){
      		if(!start&&bi[i]==0)continue;
      		else{
      			start=true;
      			cout<<bi[i];
      		}
      	}
      	QwQ
      }
      
      • 0
        @ 2024-12-29 10:59:21
        #include<bits/stdc++.h>
        using namespace std;
        signed main(){
        	int a;
        	cin>>a;
        	cout<<a*4;
        }
        
        • 0
          @ 2024-12-29 8:45:28

          答案就是 n×4n\times4

          #include<bits/stdc++.h>
          #define int long long
          #define INF 0x3f3f3f
          using namespace std;
          int n;
          signed main(){
          	cin>>n;
          	cout<<n*4;
          	return 0;
          }
          
          • -1
            @ 2024-12-29 8:50:35

            玩个好玩的:

            a=int(input())
            print(a*4)
            
            • @ 2024-12-29 8:50:46

              可以猜猜这是什么语言

          • 1

          信息

          ID
          44
          时间
          1000ms
          内存
          128MiB
          难度
          2
          标签
          递交数
          139
          已通过
          81
          上传者