提交时间:2024-12-21 11:15:17

运行 ID: 2738

#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int a[n]; int temp=0; for(int i=0;i<n;i++) { cin>>a[i]; } for(int i=0;i<n;i++) { if(a[i]==1) { cout<<40<<endl; } else if(a[i]==2) { cout<<70<<endl; } else if(a[i]>=3) { int temp=a[i]%3; int sum=(a[i]-temp)/3; if(temp==1) { cout<<sum*90+40<<endl; } else if(temp=2) { cout<<sum*70+40<<endl; } else if(temp==7) { cout<<sum*(3*90)+40<<endl; } } } return 0; }