2 条题解

  • 0
    @ 2023-11-30 19:06:01
    #include<bits/stdc++.h>
    using namespace std;
    char ch;
    inline int read(){
    	int ans=0;
    	ch=getchar();
    	while(ch<'0'||ch>'9')ch=getchar();
    	while(ch>='0'&&ch<='9')
    		ans=(ans<<1)+(ans<<3)+(ch^'0'),ch=getchar();
    	return ans;
    }
    int main(){
        int a=read(),b=read(),c=read();
        if((b<<1)==a+c){
        	int k=(c<<1)-a-b;
        	cout<<a+k<<' '<<b+k<<' '<<c+k;
    	}else{
    		int q=(c*c/a/b);
    		cout<<a*q<<' '<<b*q<<' '<<c*q;
    	}
    	return 0;
    }
    
    • 0
      @ 2023-11-15 14:17:02
      #include<iostream>
      using namespace std;
      int main(){ 
         int a,b,c;
         cin>>a>>b>>c;
         if(c - b == b - a){ 
            int t = c - b;
            cout<<c + t <<" " <<c + 2 * t <<" " << c + 3 * t<<endl;
         }else{ 
            int t = c / b;
            cout<<c * t <<" " <<c * t * t <<" " << c * t * t * t<<endl;
         }
         return 0;
      }
      
      • 1

      信息

      ID
      52
      时间
      1000ms
      内存
      16MiB
      难度
      1
      标签
      递交数
      50
      已通过
      34
      上传者