#include #include using namespace std; int s; char sir[100]; int compar(int a, int b); int main() { cin.get(sir, 100); cin >> s; if(strcmp(sir,"Single") == 0) { if(compar(0, 9075) == 1) { cout << s / 10 << '\n'; return 0; } if(compar(9075, 36900) == 1) { cout << s * 15 / 100 << '\n'; return 0; } if(compar(36900, 89350) == 1) { cout << s / 4 << '\n'; return 0; } if(compar(89350, 186350) == 1) { cout << s * 28 / 100 << '\n'; return 0; } if(compar(186350, 405100) == 1) { cout << s *33 / 100 << '\n'; return 0; } if(compar(405100, 406750) == 1) { cout << s * 35 / 100 << '\n'; return 0; } cout << s * 396 / 1000 << '\n'; return 0; } if(strcmp(sir, "Married joint filers") == 0 || strcmp(sir, "Surviving spouse") == 0) { if(compar(0, 18150) == 1) { cout << s / 10 << '\n'; return 0; } if(compar(18150, 73800) == 1) { cout << s * 15 / 100 << '\n'; return 0; } if(compar(73800, 148850) == 1) { cout << s / 4 << '\n'; return 0; } if(compar(148850, 226850) == 1) { cout << s * 28 / 100 << '\n'; return 0; } if(compar(226850, 405100) == 1) { cout << s *33 / 100 << '\n'; return 0; } if(compar(405100, 457600) == 1) { cout << s * 35 / 100 << '\n'; return 0; } cout << s * 396 / 1000 << '\n'; return 0; } if(strcmp(sir, "Married filling separately") == 0) { if(compar(0, 9075) == 1) { cout << s / 10 << '\n'; return 0; } if(compar(9075, 36900) == 1) { cout << s * 15 / 100 << '\n'; return 0; } if(compar(36900, 74425) == 1) { cout << s / 4 << '\n'; return 0; } if(compar(74425, 113425) == 1) { cout << s * 28 / 100 << '\n'; return 0; } if(compar(113425, 202550) == 1) { cout << s *33 / 100 << '\n'; return 0; } if(compar(202550, 228800) == 1) { cout << s * 35 / 100 << '\n'; return 0; } cout << s * 396 / 1000 << '\n'; return 0; } if(strcmp(sir, "Heads of household") == 0) { if(compar(0, 12950) == 1) { cout << s / 10 << '\n'; return 0; } if(compar(12950, 49400) == 1) { cout << s * 15 / 100 << '\n'; return 0; } if(compar(49400, 127550) == 1) { cout << s / 4 << '\n'; return 0; } if(compar(127550, 206600) == 1) { cout << s * 28 / 100 << '\n'; return 0; } if(compar(206600, 405100) == 1) { cout << s *33 / 100 << '\n'; return 0; } if(compar(405100, 432200) == 1) { cout << s * 35 / 100 << '\n'; return 0; } cout << s * 396 / 1000 << '\n'; return 0; } return 0; } int compar(int a, int b) { if(a <= s && s <= b) return 1; return 0; }