top1编程
← 返回题目
题解

【入门】挖胡萝卜

1 条题解

  • 0
    @ 2026-7-28 22:09:39
    #include<iostream>
    #include <iomanip>
    using namespace std;
    int main(){
    	int x;
    	cin>>x;
    	cout<<x*3<<endl;
    	cout<<x*3-8<<endl;
    	cout<<fixed<<setprecision(1)<<(x*3+x*3-8+x)/3.0<<endl;
    }
    
    • 1