package com.company;
import java.util.Scanner;
public class TravelAgency {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String town = scanner.nextLine();
String packet = scanner.nextLine();
String card = scanner.nextLine();
int countDays = Integer.parseInt(scanner.nextLine());
double price = 0;
if ("Bansko".equals(town) || "Borovets".equals(town)) {
if (packet.equals("withEquipment")) {
price = 100;
} else if (packet.equals("noEquipment")) {
price = 80;
}
} else if ("Varna".equals(town) || "Burgas".equals(town)) {
if (packet.equals("withBreakfast")) {
price = 130;
} else if (packet.equals("noBreakfast")) {
price = 100;
}
}
if (card.equals("yes")) {
if (packet.equals("withEquipment")) {
price = 100 - 100 * 0.01;
} else if (packet.equals("noEquipment")) {
price = 80 - 80 * 0.05;
} else if (packet.equals("withBreakfast")) {
price = 130 - 130 * 0.12;
} else if (packet.equals("noBreakfast")) {
price = 100 - 100 * 0.07;
}
}
if (countDays > 7) {
countDays = countDays - 1;
}
price = countDays * price;
if ("Bansko".equals(town) || "Borovets".equals(town) || "Varna".equals(town) || "Burgas".equals(town)) {
if (packet.equals("withEquipment") || packet.equals("noEquipment") || packet.equals("withBreakfast") || packet.equals("noBreakfast")) {
if (countDays > 1) {
System.out.printf("The price is %.2flv! Have a nice time!", price);
}
}
} else if (countDays < 1) {
System.out.println("Days must be positive number!");
} else {
System.out.println("Invalid input!");
}
}
}
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}