1 条题解

  • 0
    @ 2024-12-28 10:18:57
    #include<bits/stdc++.h>
    using namespace std;
    struct shangpin{
    	int id;
    	string name;
    	int price;
    }sp[30];
    int main(){ //输出商品
    	int n;
    	cin>>n;
    	for(int i=0;i<n;i++){
    		cin>>sp[i].id>>sp[i].name>>sp[i].price;
    	}
    		
    	for(int i=n-1;i>=0;i--)
    		cout<<sp[i].id<<" "<<sp[i].name<<" "<<sp[i].price<<endl;	
    	
    	return 0;
    }
    
    • 1

    信息

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