--- /dev/null
+package summerofcode;\r
+\r
+import java.io.FileReader;\r
+import java.util.Scanner;\r
+\r
+/**\r
+ *\r
+ * @author Anton Dil\r
+ */\r
+public class Day0\r
+{\r
+ public static void main(String[] args) throws Exception\r
+ { \r
+ Scanner sc = new Scanner(new FileReader("00-prices.txt")); \r
+ \r
+ String id, loc, bestId = "";\r
+ int nullarbor = 0;\r
+ int price, extras, nextCost; \r
+ int bestCost = Integer.MAX_VALUE;\r
+ \r
+ while(sc.hasNext())\r
+ {\r
+ id = sc.next(); \r
+ price = sc.nextInt(); \r
+ loc = sc.next(); \r
+ extras = sc.nextInt(); \r
+ \r
+ if(loc.contains("Nullarbor"))\r
+ nullarbor++;\r
+ \r
+ nextCost = price + extras - Math.min(extras, 500); \r
+ \r
+ if(nextCost < bestCost)\r
+ {\r
+ bestCost = nextCost; \r
+ bestId = id;\r
+ }\r
+ } \r
+ \r
+ System.out.println("Nullarbor holidays " + nullarbor);\r
+ System.out.println("Best price holiday " + bestCost + " id " + bestId );\r
+ }\r
+ \r
+}\r