링크 : https://www.acmicpc.net/problem/5355
#include <iostream>
#include <vector>
#include <set>
using namespace std;
int main() {
int T = 0;
cin >> T;
for(int i = 0; i < T; i++){
float num = 0;
cin >> num;
while(1){
char c;
cin.get(c);
if(c == '@'){
num *= 3;
}
if(c == '%'){
num += 5;
}
if(c == '#'){
num -= 7;
}
if (c == '\n'){
break;
}
}
cout<<fixed;
cout.precision(2);
cout<<num<<"\n";
}
return 0;
}