1 solutions

  • 0
    @ 2025-3-3 16:24:09

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    
    int main() {
    	int n;
    	double h,a[110];
    	cin>>h>>n;
    	for(int i = 1;i <= n;i++){
    		cin>>a[i];
    	}
    	
    	cout<<fixed<<setprecision(2)<<h<<" ";
    	for(int i = 1;i <= n;i++){
    		cout<<fixed<<setprecision(2)<<h+a[i]<<" ";
    	}
    	
    	
    	return 0;
    }
    
    
    • 1

    Information

    ID
    10027
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By