top of page

게시판 게시물

leejyjulia
2020년 8월 12일
In 소스 코드 제출
//class GStack<T> { // int tos; // Object[] stck; // public GStack() { // tos = 0; // stck = new Object[10]; // } // public void push(T item) { // if(tos==10) { // return; // } // stck[tos] = item; // tos++; // } // public T pop() { // if(tos==0) { // return null; // } // tos--; // return (T)stck[tos]; // } //} //public class Main { // public static void main(String[] args) { // GStack<String> stringStack = new GStack<String>(); // // stringStack.push("Seoul"); // stringStack.push("Busan"); // stringStack.push("LA"); // // for(int n=0;n<3;n++) { // System.out.println(stringStack.pop()); // } // // GStack<Integer> intStack = new GStack<Integer>(); // // intStack.push(1); // intStack.push(3); // intStack.push(5); // // for(int n=0;n<3;n++) { // System.out.println(intStack.pop()); // } // } //} //class GStack<T>{ // int tos; // Object [] stck; // public GStack() { // tos=0; // stck=new Object[10]; // } // public void push(T item) { // if(tos==10) { // return; // } // stck[tos] = item; // tos++; // } // public T pop() { // if(tos==0) { // return null; // } // tos--; // return (T)stck[tos]; // } //} //public class Main { // public static <T> GStack<T> reverse(GStack<T> a){ // // GStack<T> s = new GStack<T>(); // while(true) { // T tmp; // tmp = a.pop(); // if(tmp==null) { // break; // } // else { // s.push(tmp); // } // } // return s; // } // // public static void main(String[] args) { // GStack<Double> gs = new GStack<Double>(); // // for (int i=0; i<5; i++) { // gs.push(new Double(i)); // } // gs = reverse(gs); // for(int i=0;i<5;i++) { // System.out.println(gs.pop()); // } // } //} //interface IStack<T> { // T pop(); // boolean push(T ob); //} // //class MyStack<T> implements IStack<T> { // int tos; // Object [] stck; // public MyStack() { // tos=0; // stck = new Object[10]; // } // @Override // public T pop() { // if(tos==0) { // return null; // } // tos--; // return (T)stck[tos]; // } // // @Override // public boolean push(T ob) { // if(tos==10) { // return false; // } // stck[tos] = ob; // tos++; // return false; // } //} // //public class Main { // public static void main(String[] args) { // IStack<Integer> stack = new MyStack<Integer>(); // for(int i=0;i<10;i++) { // stack.push(i); // } // while (true) { // Integer n = stack.pop(); // if (n==null){ // break; // } // System.out.print(n+" "); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // HashMap<String,String> quiz = new HashMap<String, String>(); // // System.out.println("****English Vocabulary Test Program****"); // Scanner scanner = new Scanner(System.in); // while (true) { // System.out.print("Vocab Test(1), Enter Vocab(2), Shut Down(3)"); // int a = scanner.nextInt(); // if (a==3) { // System.out.println("System shutting down..."); // break; // } // if(a==2) { // System.out.println("Enter 'stop' to stop entering vocab."); // while (true) { // System.out.print("Enter English and Korean>>"); // String eng = scanner.next(); // if (eng.equals("stop")) { // break; // } // String kor = scanner.next(); // quiz.put(eng, kor); // } // } // if (a==1) { // while (true) { // Set<String> keys =quiz.keySet(); // Iterator<String> it = keys.iterator(); // Random random = new Random(); // int i = 0; // String eng = null; // while(i<=random.nextInt(quiz.size())) { // eng = it.next(); // i++; // } // System.out.println(eng+"?"); // // while (true) { // Set<String> pp =quiz.keySet(); // Iterator<String> tt = pp.iterator(); // Random mm = new Random(); // int p =0; // String kor =null; // // for (i=1;i<=4;i++) { // kor = tt.next(); // System.out.print("("+i+")"+kor+" "); // // } // int b = scanner.nextInt(); // } // // } // } // } // } //}
0
0
2
leejyjulia
2020년 8월 11일
In 소스 코드 제출
//import java.util.*; //public class Main { // public static void main(String[] args) { // HashMap<Double, String> grade = new HashMap<Double, String>(); // System.out.println("future scholarship system."); // Scanner scanner = new Scanner(System.in); // for (int i=0;i<5;i++) { // System.out.print("name and gpa>>"); // String name = scanner.next(); // double gpa = scanner.nextDouble(); // grade.put(gpa, name); // } // System.out.print("장핟생 선발 기준입력>>"); // double gpa1 = scanner.nextDouble(); // System.out.print("Scholars: "); // // Set<Double> keys = grade.keySet(); // Iterator<Double> it = keys.iterator(); // while(it.hasNext()) { // Double key = it.next(); // String value = grade.get(key); // // if (key > gpa1) { // System.out.print(value+" "); // } // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // HashMap <String, Integer> pointSystem = new HashMap<String,Integer>(); // Scanner scanner = new Scanner(System.in); // System.out.println("**Point Tracking System**"); // // while(true) { // System.out.print("Enter name and points>>"); // String name = scanner.next(); // if(name.equals("stop")) { // break; // } // int point = scanner.nextInt(); // // // if (pointSystem.containsKey(name)){ // point = point + pointSystem.get(name); // pointSystem.remove(name); // } // pointSystem.put(name, point); // // Set<String> keys = pointSystem.keySet(); // Iterator<String> it = keys.iterator(); // // while(it.hasNext()) { // String name1 = it.next(); // int pts = pointSystem.get(name1); // System.out.println("(" + name1 + "," + pts + ")"); // } // } // } //} //import java.util.Scanner; //interface ShapeInterface { // void enter(); // void delete(); // void view(); // void shutdown(); // default void printLine() { // System.out.println("enter(1), delete(2), view(3), shutdown(4)>>"); // } //} // //class Shape{ // public void draw() { // System.out.println("Shape"); // } //} //class Line extends Shape { // public void draw() { // System.out.println("Line"); // } //} //class Rect extends Shape { // public void draw() { // System.out.println("Rect"); // } //} //class Circle extends Shape{ // public void draw() { // System.out.println("Circle"); // } //} // //class Graphic extends Shape implements ShapeInterface { // Scanner t = new Scanner(System.in); // @Override // public void enter() { // // TODO Auto-generated method stub // System.out.println("Shape Type Line(1), Rect(2), Circle(3)>>"); // int enter = t.nextInt(); // } // // @Override // public void delete() { // // TODO Auto-generated method stub // System.out.println("location of the shape>>"); // int delete = t.nextInt(); // } // // @Override // public void view() { // // TODO Auto-generated method stub // // } // // @Override // public void shutdown() { // // TODO Auto-generated method stub // System.out.println("System shutting down..."); // } //} // //public class Main { // static void paint(Shape p) { // p.draw(); // } // public static void main(String[] args) { // Graphic graphic = new Graphic(); // for(;;) { // paint(new); // // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // HashMap<String,String> quiz = new HashMap<String, String>(); // // System.out.println("****수도 맞추기 게임을 시작합니다.****"); // Scanner scanner = new Scanner(System.in); // while (true) { // System.out.print("Enter(1), Quiz(2), Shut down(3)>>"); // int a = scanner.nextInt(); // if (a==3) { // break; // } // if (a==1) { // for (int i=0;;i++) { // System.out.print("Enter nation and capital"+ i + ">>"); // String nation = scanner.next(); // if (nation.equals("stop")) { // break; // } // if (quiz.containsValue(nation)) { // System.out.println(nation+" already exists."); // } // String capital = scanner.next(); // quiz.put(nation, capital); // } // } // if (a==2) { // while (true) { // Set<String> keys =quiz.keySet(); // Iterator<String> it = keys.iterator(); // Random random = new Random(); // int i = 0; // String nation = null; // while(i<=random.nextInt(quiz.size())) { // nation = it.next(); // i++; // } // System.out.print("The capital of "+ nation + " is? "); // String answer = scanner.next(); // if (answer.equals("stop")) { // break; // } // if (answer.equals(quiz.get(nation))) { // System.out.println("Correct!!"); // } // else { // System.out.println("Incorrect!!"); // } // } // } // } // } //}
0
0
3
leejyjulia
2020년 8월 06일
In 소스 코드 제출
//import java.util.*; //public class Main { // public static void main(String[] args) { // ArrayList<String> a = new ArrayList<String>(); // // Scanner scanner = new Scanner(System.in); // float sum = 0; // System.out.print("enter 6 grades with space between them>>"); // for(int i=0; i<6;i++) { // String s = scanner.next(); // a.add(s); // } // for (int i=0;i<a.size();i++) { // if(a.get(i).equals("A")) { // sum+=4.0; // } // if(a.get(i).equals("B")) { // sum+=3.0; // } // if(a.get(i).equals("C")) { // sum+=2.0; // } // if(a.get(i).equals("D")) { // sum+=1.0; // } // if(a.get(i).equals("F")) { // sum+=0; // } // } // System.out.println(sum/a.size()); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // HashMap<String, Integer> nations = new HashMap<String, Integer>(); // System.out.println("enter name of the nation and the population.(ex: Korea 5000)"); // // Scanner scanner = new Scanner(System.in); // while (true) { // System.out.print("nation, population >> "); // String nation = scanner.next(); // if(nation.equals("stop")) { // break; // } // int population = scanner.nextInt(); // nations.put(nation, (int) population); // // } // while (true) { // System.out.print("Search population >> "); // String searchNation = scanner.next(); // if(searchNation.equals("stop")) { // break; // } // if(nations.containsKey(searchNation)) { // System.out.println("The population of " + searchNation + " is " + nations.get(searchNation)); // } // if(nations.get(searchNation)==null) { // System.out.println(searchNation + " does not exist."); // } // } // } //} //import java.util.Scanner; //import java.util.Vector; //public class Main { // public static void main(String[] args) { // Vector<Integer> v = new Vector<Integer>(); // Scanner scanner = new Scanner(System.in); // for (;;) { // System.out.print("강수량 입력 >> "); // int rain = scanner.nextInt(); // if(rain==0) { // break; // } // v.add(rain); // int sum = 0; // for (int i=0; i<v.size(); i++) { // int n = v.get(i); // System.out.println(n + " "); // sum += n; // } // System.out.println("current average: " + sum/v.size()); // } // } //} //import java.util.*; //class Student { // String name; // String major; // int year; // String gpa; //} //public class Main { // public static void main(String[] args) { // Scanner scanner = new Scanner(System.in); // ArrayList<Student> s = new ArrayList<Student>(); // System.out.println("Enter student name, major, year, and gpa."); // // for (int i=0; i<4; i++) { // System.out.print(">> "); // Student st = new Student(); // String a =scanner.nextLine(); // String ss[] = a.split(", "); // st.name = ss[0]; // st.major = ss[1]; // st.year = Integer.valueOf(ss[2]); // st.gpa = ss[3]; // s.add(st); // } // for (int i=0;i<s.size();i++) { // System.out.println("------------------------"); // System.out.println("Name: " + s.get(i).name); // System.out.println("Major: " + s.get(i).major); // System.out.println("Year: " + s.get(i).year); // System.out.println("GPA: " + s.get(i).gpa); // } // System.out.println("-------------------------"); // while (true) { // System.out.print("Student name: "); // String name1 = scanner.next(); // if (name1.equals("stop")) { // break; // } // for(int i=0;i<s.size();i++) { // Student n = s.get(i); // if (n.name.equals(name1)) { // System.out.println(n.name +", "+ n.major + ", " + n.year+ ", " + n.gpa); // } // } // } // } //} //import java.util.*; // //class Location{ // String city; // String longitude; // String latitude; //} //public class Main { // public static void main(String[] args) { // HashMap<String, Location> map = new HashMap<String, Location>(); // System.out.println("Enter city, longitude, and latitude."); // Scanner scanner = new Scanner(System.in); // for (int i=0; i<4; i++) { // System.out.print(">> "); // Location st = new Location(); // String a = scanner.nextLine(); // String ss[] = a.split(", "); // st.city = ss[0]; // st.longitude = ss[1]; // st.latitude = ss[2]; // map.put(st.city, st); // } // System.out.println("-------------------------"); // Set<String> keys = map.keySet(); // Iterator<String> it = keys.iterator(); // while(it.hasNext()) { // String key = it.next(); // Location value = map.get(key); // System.out.println(value.city + " " + value.longitude + " " + value.latitude); // } // System.out.println("-------------------------"); // // while(true) { // System.out.print("City name: "); // String city1 = scanner.next(); // if(city1.equals("stop")) { // break; // } // Location city2 = map.get(city1); // if(city2 == null) { // System.out.println(city1 + " does not exist."); // } // else { // System.out.println(city2.city+" "+city2.longitude+" "+city2.latitude); // } // } // } //}
0
0
4
leejyjulia
2020년 8월 04일
In 소스 코드 제출
//import java.util.Vector; //public class Main { // public static void main(String[] args) { // Vector<Integer> v = new Vector<Integer>(); // v.add(5); // v.add(4); // v.add(-1); // v.add(2,100); // // System.out.println("size within vector: " + v.size()); // System.out.println("capacity of vector: " + v.capacity()); // // for (int i=0; i<v.size(); i++) { // System.out.println(v.get(i)); // } // // int sum = 0; // for (int i=0; i<v.size(); i++) { // int n = v.elementAt(i); // sum += n; // } // System.out.println("sum of numbers in vector: " + sum); // // } //} //import java.util.Vector; //class Point { // private int x,y; // public Point(int x, int y) { // this.x = x; // this.y = y; // } // public String toString() { // return "(" + x + "," + y + ")"; // } //} // //public class Main { // public static void main(String[] args) { // Vector<Point> v = new Vector<Point> (); // // v.add(new Point(2,3)); // v.add(new Point (-5,20)); // v.add(new Point (30,-8)); // v.remove(1); // // for (int i=0; i<v.size(); i++) { // Point p = v.get(i); // System.out.println(p); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // ArrayList<String> a = new ArrayList<String>(); // // Scanner scanner = new Scanner(System.in); // for (int i=0; i<4; i++) { // System.out.print("enter name>>"); // String s = scanner.next(); // a.add(s); // } // // for (int i=0; i<a.size(); i++) { // String name = a.get(i); // System.out.println(name + " "); // } // // int longestIndex = 0; // for (int i=1; i<a.size(); i++) { // if (a.get(longestIndex).length() < a.get(i).length()) { // longestIndex = i; // } // } // System.out.println("\nThe longest name is " + a.get(longestIndex)); // scanner.close(); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // HashMap<String,String> dic = new HashMap<String,String>(); // // dic.put("baby", "아기"); // dic.put("love", "사랑"); // dic.put("apple", "사과"); // // Scanner scanner = new Scanner(System.in); // while(true) { // System.out.print("Search:"); // String eng = scanner.next(); // // if(eng.equals("exit")) { // System.out.println("program shutting down..."); // break; // } // String kor = dic.get(eng); // if(kor == null) { // System.out.println(eng + " does not exist"); // } // else { // System.out.println(kor); // } // } // scanner.close(); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // HashMap<String, Integer> scoreMap = new HashMap<String, Integer>(); // // scoreMap.put("James", 97); // scoreMap.put("Jesse", 88); // scoreMap.put("Danny", 98); // scoreMap.put("Judah", 70); // scoreMap.put("Charles", 99); // // System.out.println("size in HashMap: " + scoreMap.size()); // // Set<String> keys = scoreMap.keySet(); // Iterator<String> it = keys.iterator(); // // while (it.hasNext()) { // String name = it.next(); // int score = scoreMap.get(name); // System.out.println(name + " : " + score); // } // } //} //import java.util.*; //class Student { // private int id; // private String tel; // public Student(int id, String tel) { // this.id = id; // this.tel = tel; // } // public int getId() { // return id; // } // public String getTel() { // return tel; // } //} //public class Main { // public static void main(String[] args) { // HashMap<String,Student> map = new HashMap<String, Student>(); // map.put("james", new Student(1, "010-1111-1111")); // map.put("David", new Student(2, "010-2222-2222")); // map.put("Romeo", new Student(3, "010-3333-3333")); // // Scanner scanner = new Scanner(System.in); // while(true) { // System.out.print("enter name: "); // String name = scanner.nextLine(); // if(name.equals("exit")) { // break; // } // Student student = map.get(name); // if(student == null) { // System.out.println(name + " does not exist."); // } // else { // System.out.println("id: " + student.getId() + ", phone: " + student.getTel()); // } // } // scanner.close(); // } //} //import java.util.*; //public class Main{ // static void printList(LinkedList<String> l) { // // // Iterator<String> iterator = l.iterator(); // while (iterator.hasNext()) { // String e = iterator.next(); // String separator; // if (iterator.hasNext()) // separator = "->"; // else // separator = "\n"; // System.out.print(e+separator); // } // } // public static void main(String[] args) { // LinkedList<String> myList = new LinkedList<String>(); // myList.add("Transformer"); // myList.add("Starwars"); // myList.add("Matrix"); // myList.add(0, "Terminator"); // myList.add(2,"Avatar"); // // Collections.sort(myList); // printList(myList); // // Collections.reverse(myList); // printList(myList); // // int index = Collections.binarySearch(myList, "Avatar") + 1; // System.out.println("Avatar is " + index + "th place"); // } //} //import java.util.Scanner; //import java.util.Vector; // //public class Main { // public static void main(String[] args) { // Vector<Integer> v = new Vector<Integer>(); // // Scanner scanner = new Scanner(System.in); // // while(true) { // System.out.print("enter number>>"); // int s = scanner.nextInt(); // if (s==-1) { // v.add(s); // break; // } // else { // v.add(s); // } // } // // for (int i=0;i<v.size();i++) { // int n = v.get(i); // System.out.print(n + " "); // } // // int largestNumber = 0; // for(int i=0; i<v.size();i++) { // if(v.get(largestNumber) < v.get(i)) { // largestNumber = i; // } // } // System.out.println("\nThe largest number is " + v.get(largestNumber)); // } //}
0
0
3
leejyjulia
2020년 7월 30일
In 소스 코드 제출
//import java.util.*; //public class Main { // public static void main(String[] args) { // ArrayList<String> collection1 = new ArrayList<>(); // collection1.add("New York"); // collection1.add("Atlanta"); // collection1.add("Dallas"); // collection1.add("Madison"); // // System.out.println("A list of cities int collection1: "); // System.out.println(collection1); // // System.out.println("\nIs Dallas in collection1? " + collection1.contains("Dallas")); // // collection1.remove("Dallas"); // System.out.println("\n" + collection1.size() + " cities are in collection1 now"); // // Collection<String> collection2 = new ArrayList<>(); // collection2.add("Seattle"); // collection2.add("Portland"); // collection2.add("Los Angeles"); // collection2.add("Atlanta"); // // System.out.println("\nA list of cities in collection2:"); // System.out.println(collection2); // // ArrayList<String> c1 = (ArrayList<String>)(collection1.clone()); // c1.addAll(collection2); // System.out.println("\nCities in collection1 or collection2: "); // System.out.println(c1); // // c1 = (ArrayList<String>)(collection1.clone()); // c1.retainAll(collection2); // System.out.print("\nCities in collection1 and collection2: "); // System.out.println(c1); // // c1 = (ArrayList<String>)(collection1.clone()); // c1.removeAll(collection2); // System.out.print("\nCities in collection 1, but not in 2: "); // System.out.println(c1); // } //} //import java.util.*; // //public class Main { // public static void main(String[] args) { // Collection<String> collection = new ArrayList<>(); // collection.add("New York"); // collection.add("Atlanta"); // collection.add("Dallas"); // collection.add("Madison"); // // Iterator<String> iterator = collection.iterator(); // while (iterator.hasNext()) { // System.out.print(iterator.next().toUpperCase() + " "); // } // System.out.println(); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Vector<Integer> v = new Vector<Integer>(); // v.add(5); // v.add(4); // v.add(-1); // v.add(2,100); // // Iterator<Integer> it = v.iterator(); // while(it.hasNext()) { // int n = it.next(); // System.out.println(n); // } // // int sum = 0; // it = v.iterator(); // while (it.hasNext()) { // int n =it.next(); // sum += n; // } // System.out.println("the sum of vector: " + sum); // } //} //import java.util.*; //public class Main{ // public static void main(String[] args) { // List<Integer> arrayList = new ArrayList<>(); // arrayList.add(1); // arrayList.add(2); // arrayList.add(3); // arrayList.add(1); // arrayList.add(4); // arrayList.add(0,10); // arrayList.add(3,30); // // System.out.println("A list of integers in the array list: "); // System.out.println(arrayList); // // LinkedList<Object> linkedList = new LinkedList<>(arrayList); // linkedList.add(1, "red"); // linkedList.removeLast(); // linkedList.addFirst("green"); // // System.out.println("Display the linked list forward:"); // ListIterator<Object> listIterator = linkedList.listIterator(); // while (listIterator.hasNext()) { // System.out.print(listIterator.next() + " "); // } // System.out.println(); // // System.out.println("Display the linked list backward:"); // listIterator = linkedList.listIterator(linkedList.size()); // while (listIterator.hasPrevious()) { // System.out.print(listIterator.previous() + " "); // } // } //} //import java.util.*; //public class Main{ // public static void main(String[] args) { // ArrayList<String> a = new ArrayList<String> (); // // Scanner scanner = new Scanner(System.in); // for(int i=0; i<4; i++) { // System.out.print("enter name>>"); // String s = scanner.next(); // a.add(s); // } // // for(int i=0; i<a.size(); i++) { // String name = a.get(i); // System.out.print(name + " "); // } // int longestIndex = 0; // for(int i=1; i<a.size(); i++) { // if(a.get(longestIndex).length() < a.get(i).length()); // longestIndex = i; // } // System.out.println("\nThe longest name is: " + a.get(longestIndex)); // scanner.close(); // } //}
0
0
6
leejyjulia
2020년 7월 29일
In 소스 코드 제출
import java.util.Scanner; import java.util.StringTokenizer; //import java.util.Scanner; //interface ShapeInterface { // void enter(); // void delete(); // void view(); // void shutdown(); // default void printLine() { // System.out.println("enter(1), delete(2), view(3), shutdown(4)>>"); // } //} // //class Shape{ // public void draw() { // System.out.println("Shape"); // } //} //class Line extends Shape { // public void draw() { // System.out.println("Line"); // } //} //class Rect extends Shape { // public void draw() { // System.out.println("Rect"); // } //} //class Circle extends Shape{ // public void draw() { // System.out.println("Circle"); // } //} // //class Graphic extends Shape implements ShapeInterface { //Scanner t = new Scanner(System.in); // // @Override // public void enter() { // // TODO Auto-generated method stub // System.out.println("Shape Type Line(1), Rect(2), Circle(3)>>"); // int enter = t.nextInt(); // } // // @Override // public void delete() { // // TODO Auto-generated method stub // System.out.println("location of the shape>>"); // int delete = t.nextInt(); // } // // @Override // public void view() { // // TODO Auto-generated method stub // // } // // @Override // public void shutdown() { // // TODO Auto-generated method stub // System.out.println("System shutting down..."); // } //} // //public class Main { // static void paint(Shape p) { // p.draw(); // } // public static void main(String[] args) { // Graphic graphic = new Graphic(); // for(::) { // print // } // } //} //abstract class Calculator { // public abstract int add(int a, int b); // public abstract int subtract(int a,int b); // public abstract double average(int[] a); //} // //public class Main extends Calculator { // // @Override // public int add(int a, int b) { // // TODO Auto-generated method stub // return a+b; // } // // @Override // public int subtract(int a, int b) { // // TODO Auto-generated method stub // return a-b; // } // // @Override // public double average(int[] a) { // // TODO Auto-generated method stub // double sum = 0; // for (int i =0; i<a.length; i++) // sum+=a[i]; // return sum/a.length; // } // public static void main(String[] args) { // Calculator c = new Main(); // System.out.println(c.add(2, 3)); // System.out.println(c.subtract(2, 3)); // System.out.println(c.average(new int [] {2,3,4})); // } //} //class Point { // private int x,y; // public Point(int x, int y) { // this.x = x; // this.y = y; // } //} //public class Main { // public static void main(String[] args) { // Point p = new Point (2,3); // System.out.println(p.getClass().getName()); // System.out.println(p.hashCode()); // System.out.println(p.toString()); // } //} //class Point { // private int x,y; // public Point (int x, int y) { // this.x = x; // this.y = y; // } // public String toString() { // return "Point(" + x + "," + y + ")"; // } //} //public class Main { // public static void main(String[] args) { // Point a = new Point (2,3); // System.out.println(a.toString()); // System.out.println(a); // } //} //class Point { // private int x,y; // public Point(int x, int y) { // this.x = x; // this.y = y; // } // public boolean equals(Object obj) { // Point p = (Point)obj; // if (x==p.x&&y==p.y) // return true; // else // return false; // } //} //public class Main { // public static void main(String[] args) { // Point a = new Point (2,3); // Point b = new Point (2,3); // Point c = new Point (3,4); // if (a==b) // System.out.println("a==b"); // if (a.equals(b)) // System.out.println("a is equal to b"); // if (a.equals(c)) // System.out.println("a is equal to c"); // } //} //class Rect { // private int w,h; // public Rect(int w,int h) { // this.w = w; // this.h = h; // } // public boolean equals(Object obj) { // Rect p = (Rect)obj; // if (w*h == p.w*p.h) // return true; // else // return false; // } //} //public class Main { // public static void main(String[] args) { // Rect a = new Rect(2,3); // Rect b = new Rect(3,2); // Rect c = new Rect(3,4); // if(a.equals(b)) // System.out.println("a is equal to b"); // if(a.equals(c)) // System.out.println("a is equal to c"); // if(b.equals(c)) // System.out.println("b is equal to c"); // } //} //import java.util.*; // //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // String number = "10"; // System.out.println(Integer.parseInt(number)); // // } //} //public class Main { // public static void main(String[] args) { // System.out.println(Character.toLowerCase('A')); // char c1='4', c2='F'; // if(Character.isDigit(c1)) // System.out.println(c1 + " is a number"); // if(Character.isAlphabetic(c2)) // System.out.println(c2 + " is English"); // // System.out.println(Integer.parseInt("28")); // System.out.println(Integer.toString(28)); // System.out.println(Integer.toBinaryString(28)); // System.out.println(Integer.bitCount(28)); // // Integer i = Integer.valueOf(28); // System.out.println(i.doubleValue()); // // Double d = Double.valueOf(28); // System.out.println(d.toString()); // System.out.println(Double.parseDouble("3.14")); // // boolean b = (4>3); // System.out.println(Boolean.toString(b)); // System.out.println(Boolean.parseBoolean("false")); // } //} //public class Main { // public static void main(String[] args) { // String a = new String (" C#"); // String b = new String (",C++ "); // // System.out.println(a + "의 길이는 " + a.length()); // System.out.println(a.contains("#")); // // a = a.concat(b); // System.out.println(a); // // a = a.trim(); // System.out.println(a); // // a = a.replace("C#", "Java"); // System.out.println(a); // // String s[] = a.split(","); // for (int i=0; i<s.length; i++) // System.out.println("분리된 문자열" + i + ": " +s[i]); // // a = a.substring(5); // System.out.println(a); // // char c = a.charAt(2); // System.out.println(c); // } //} //import java.util.StringTokenizer; //public class Main { // public static void main(String[] args) { // String query = "name=kitae&addrseoul&age=21"; // StringTokenizer st = new StringTokenizer(query, "&"); // // int n = st.countTokens(); // System.out.println("토큰개수 = " + n); // while (st.hasMoreTokens()) { // String token = st.nextToken(); // System.out.println(token); // } // } //} //public class Main{ // public static void main(String[] args) { // System.out.println(Math.abs(-3.14)); // System.out.println(Math.sqrt(9.0)); // System.out.println(Math.exp(2)); // System.out.println(Math.round(3.14)); // // System.out.print("This week's lucky numbers are "); // for (int i = 0; i<5; i++) // System.out.print((int) (Math.random()*45+1) + " "); // } //} //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int alphabet[] = new int[26]; // while(true) { // String str = t.nextLine(); // if (str.equals(";")) // break; // // for(int i=0; i<str.length(); i++) { // char p; // if(str.charAt(i) >= 'A' && str.charAt(i) <='Z') { // p = (char) (str.charAt(i) + 32); // alphabet[p-'a']++; // } // if(str.charAt(i)>= 'a' && str.charAt(i)<='z') { // p = (char)str.charAt(i); // alphabet[p-'a']++; // } // } // // // } // // for (int i=0; i<26;i++) { // System.out.print((char)('A'+i)+":"+alphabet[i]+'\t'); // for(int j=0; j<alphabet[i];j++) { // System.out.print("-"); // } // System.out.println(); // } // // } //}
0
0
4
leejyjulia
2020년 7월 23일
In 소스 코드 제출
//import java.util.Scanner; // //interface StackInterface { // int length(); // String pop(); // boolean push(String ob); //} // //class StringStack implements StackInterface { // String [] stack = new String [100]; // int top = 0; // @Override // public int length() { // return stack.length; // } // // @Override // public String pop() { // return stack[--top]; // } // // @Override // public boolean push(String ob) { // if(top==stack.length) { // return false; // } // stack[top++] = ob; // return true; // } //} // //public class Main { // public static void main(String[] args) { // StringStack kk = new StringStack(); // Scanner t = new Scanner(System.in); // String mm = t.nextLine(); // String [] divide = mm.split(" "); // int top = 0; // for (int i=0; i<divide.length; i++) { // if(kk.push(divide[i])) { // kk.stack[top++] = divide[i]; // } // else { // break; // } // } // // for(--top; top>=0; top--) { // if(top>=0) { // System.out.print(kk.pop()+" "); // } // } // } //} //import java.util.*; // //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // String str = t.nextLine(); // System.out.println("input data is > " + str); // String []devide = str.split(" "); // 0 ~ n-1 // String []stack = new String[1000]; // int top= 0; // // for(int i=0; i<devide.length; i ++) { // stack[top++] = devide[i]; // } // for(--top; top >= 0; top--) { // System.out.print(stack[top]+" "); // } // } //} import java.util.Scanner; class Student { private String name; private int korean; private int math; private int science; public Student() { } public Student(String name, int korean, int math, int science) { this.name = name; this.korean = korean; this.math = math; this.science = science; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getKorean() { return korean; } public void setKorean(int korean) { this.korean = korean; } public int getMath() { return math; } public void setMath(int math) { this.math = math; } public int getScience() { return science; } public void setScience(int science) { this.science = science; } } public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); Student student = new Student(); System.out.print("Name>>"); String name = scanner.nextLine(); System.out.print("Korean>>"); int korean = scanner.nextInt(); System.out.print("Math>>"); int math = scanner.nextInt(); System.out.print("Science>>"); int science = scanner.nextInt(); System.out.println("name is " +student.getName()); } }
0
0
9
leejyjulia
2020년 7월 22일
In 소스 코드 제출
//abstract class Calculator { // public abstract int add(int a, int b); // public abstract int subtract(int a, int b); // public abstract double average(int[] a); //} // //public class Main extends Calculator { // // @Override // public int add(int a, int b) { // return a + b; // } // // @Override // public int subtract(int a, int b) { // return a - b; // } // // @Override // public double average(int[] a) { // double sum = 0; // for (int i = 0; i< a.length; i++) // sum += a[i]; // return sum/a.length; // } // public static void main(String[] args) { // Main c = new Main(); // System.out.println(c.add(2, 3)); // System.out.println(c.subtract(2, 3)); // System.out.println(c.average(new int [] { 2,3,4})); // } //} //interface PhoneInterface { // final int TIMEOUT = 10000; // void sendCall(); // void receiveCall(); // default void printLogo() { // System.out.println("**Phone**"); // } //} // //class SamsungPhone implements PhoneInterface { // // @Override // public void sendCall() { // System.out.println("ring ring ring ring"); // // } // // @Override // public void receiveCall() { // System.out.println("you have a call"); // } // public void flash( ) { // System.out.println("your flash is on"); // } //} // //public class Main { // public static void main(String[] args) { // SamsungPhone phone = new SamsungPhone(); // phone.printLogo(); // phone.sendCall(); // phone.receiveCall(); // phone.flash(); // } //} //interface PhoneInterface { // final int TIMEOUT = 10000; // void sendCall(); // void receivecall(); // default void printLogo() { // System.out.println("**Phone**"); // } //} // //class Calc { // public int calculate(int x, int y) { // return x + y; // } //} // //class SmartPhone extends Calc implements PhoneInterface { // // @Override // public void sendCall() { // System.out.println("ring ring ring ring"); // } // // @Override // public void receivecall() { // System.out.println("you have a call"); // } // public void schedule() { // System.out.println("taking care of schedule"); // } //} // //public class Main { // public static void main(String[] args) { // SmartPhone phone = new SmartPhone(); // phone.printLogo(); // phone.sendCall(); // System.out.println("3 + 5 is " + phone.calculate(3, 5)); // phone.schedule(); // } //} //class Circle { // private int radius; // public Circle() { // // } // public Circle(int radius) { // this.radius = radius; // } // public int getRadius() { // return radius; // } //} // //class NamedCircle extends Circle { // private String name; // public NamedCircle(int radius) { // super(radius); // // TODO Auto-generated constructor stub // } // public NamedCircle(int radius, String name) { // super(radius); // this.name = name; // } // // public void show() { // System.out.print(name); // System.out.print(", radius = "); // System.out.println(getRadius()); // } //} // // // //public class Main { // public static void main(String[] args) { // NamedCircle w = new NamedCircle(5, "Waffle"); // w.show(); // } //} //interface AdderInterface { // int add(int x, int y); // int add(int n); //} // //class MyAdder implements AdderInterface { // // @Override // public int add(int x, int y) { // return x +y; // } // // @Override // public int add(int n) { // int sum = 0; // for(int i = 0;i<n+1; i++) // sum += i; // return sum; // } //} //public class Main { // public static void main(String[] args) { // MyAdder adder = new MyAdder(); // System.out.println(adder.add(5, 10)); // System.out.println(adder.add(10)); // } //} //import java.util.Scanner; // //abstract class Calculator { // protected int a,b; // abstract protected int calc(); // protected void input() { // Scanner scanner = new Scanner(System.in); // System.out.print("정수 2개 를 입력하세요>>"); // a = scanner.nextInt(); // b = scanner.nextInt(); // } // public void run() { // input(); // int res = calc(); // System.out.println("계산된값은 " + res); // } //} // //class Adder extends Calculator { // @Override // protected int calc() { // return a+b; // } //} // //class Subtracter extends Calculator { // // @Override // protected int calc() { // return a-b; // } //} // //public class Main { // public static void main(String[] args) { // Adder adder = new Adder(); // Subtracter sub = new Subtracter(); // // adder.run(); // sub.run(); // } //} //class Point { // private int x,y; // public Point (int x, int y) { // this.x = x; // this.y = y; // } // public int getX() { // return x; // } // public int getY() { // return y; // } // protected void move (int x, int y) { // this.x = x; // this.y = y; // } //} // //class ColorPoint extends Point { // private String color; // // public ColorPoint(int x, int y, String color) { // super(x, y); // this.color = color; // } // public void setPoint(int x, int y) { // this.move(10, 20); // } // public void setColor(String color) { // this.color = color; // } // public void show() { // System.out.print(color); // System.out.print(" for "); // System.out.println("(" + getX() + "," + getY() + ")"); // } //} // //public class Main { // public static void main(String[] args) { // ColorPoint cp = new ColorPoint(5,5,"Yellow"); // cp.setPoint(10, 20); // cp.setColor("green"); // cp.show(); // } //}
0
0
6
leejyjulia
2020년 7월 21일
In 소스 코드 제출
//public class Main { // private int w, h; // private char fillChar; // public Main() { // this(10, 1); // } // public Main (int w, int h) { // this.w = w; // this.h = h; // } // public void draw() { // for (int i=0; i<h; i++) { // for(int j=0; j<w; j++) { // System.out.print(fillChar); // } // System.out.println(); // } // } // public void fill(char c) { // this.fillChar = c; // } // public static void main(String[] args) { // Main a = new Main(); // Main b = new Main(20,3); // a.fill('*'); // b.fill('%'); // a.draw(); // b.draw(); // } //} //import java.util.Scanner; //class Player { // private String name; // public Player(String name) { // this.name = name; // } // public String getName() { // return name; // } //} // //public class Main { // public static void main(String[] args) { // Scanner scanner = new Scanner(System.in); // Player [] p = new Player[2]; // for(int i=0; i<p.length; i++) { // System.out.print("선수 이름 입력>>"); // p[i] = new Player(scanner.next()); // } // int n=0; // while(true) { // System.out.print(p[n].getName() + "씨, <Enter 외 아무키나 치세요>"); // scanner.next(); // int [] val = new int [3]; // for (int i=0; i<val.length;i++) { // val[i] = (int)(Math.random()*3); // System.out.print(val[i]+" \t"); // } // System.out.println(); // if (val[1]==val[2] && val[0] == val[1]) { // System.out.println(p[n].getName() + " 이 승리하였습니다."); // break; // } // n++; // n =n%2; // } // scanner.close(); // } //} //import java.util.*; // //class parents { // int a, b, c; // // // method overloading // void show() { // System.out.println("IM yor father"); // } // void show(int k) { // System.out.println("IM YOUR MOTHER"); // } // // int call(int n) { // // return 0; // } //} // //class child extends parents { // int d, e, f; // // // method overriding => redefinition // void show() { // System.out.println("IM YOUR SUN"); // } // //} // //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // parents p = new parents(); // child c = new child(); // // c.show(); // p.show(10); // } //} //class Point { // private int x,y; // public void set(int x, int y) { // this.x = x; // this.y = y; // } // public void showPoint() { // System.out.println("(" + x + "," + y + ")"); // } //} // //class ColorPoint extends Point { // private String color; // public void setColor(String color) { // this.color = color; // } // public void showColorPoint() { // System.out.print(color); // showPoint(); // } //} // //public class Main { // public static void main(String[] args) { // Point p = new Point(); // p.set(1,2); // p.showPoint(); // // ColorPoint cp = new ColorPoint(); // cp.set(3, 4); // cp.setColor("red"); // cp.showColorPoint(); // } //} /* class Point { private int x,y; public Point() { this.x = this.y = 0; } public Point(int x, int y) { this.x = x; this.y = y; } public void showPoint() { System.out.println("(" + x + "," + y + ")"); } } class ColorPoint extends Point { private String color; public ColorPoint (int x, int y, String color) { super(x,y); this.color = color; } public void showColorPoint() { System.out.print(color); showPoint(); } } public class Main { public static void main(String[] args) { ColorPoint cp = new ColorPoint(5,6, "blue"); cp.showColorPoint(); } } */ //import java.util.*; // //class calculater { // private int a, b, c; // public calculater() { // this(0, 0); // } // public calculater(int a, int b) { // this.a = a; // this.b = b; // } // // public int sum() { // System.out.println("CALCU:LA"); // return this.a + this.b; // } //} // //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // calculater c = new calculater(10, 20); // System.out.println(c.sum()); // // } //} //import java.util.*; // //class parents { // int a; // void talk() { // System.out.println("454544"); // } //} // //class child extends parents { // void talk() { // System.out.println("asdjaskjdhaskdjdhaskjdh"); // } //} // //public class Main { // public static void main(String[] args) { // // upcasting //// parents p; //// child c = new child(); //// c.a = 10; //// System.out.println("before : " + c.a); //// p = c; //// System.out.println("after : " + p.a +" " + c.a); // // // downcasting // // parents p = new child(); // child c; // // p.a = 100; // c = (child)p; // System.out.println(p.a + " " + c.a); // // } //} //class Person { // String name; // String id; // // public Person(String name) { // this.name = name; // } //} // //class Student extends Person { // String grade; // String department; // // public Student(String name) { // super(name); // } //} // //public class Main { // public static void main(String[] args) { // Person p; // Student s = new Student("jkhe"); // p = s; // // System.out.println(p.name); // } //} //class Shape { // public void draw() { // System.out.println("Shape"); // } //} //class Line extends Shape { // public void draw() { // System.out.println("Line"); // } //} //class Rect extends Shape { // public void draw() { // System.out.println("Rect"); // } //} //class Circle extends Shape { // public void draw() { // System.out.println("Circle"); // } //} // //public class Main { // static void paint(Shape p) { // p.draw(); // } // public static void main(String[] args) { // Line line = new Line(); // paint(line); // // paint(new Shape()); // paint(new Line()); // paint(new Rect()); // paint(new Circle()); // } //} abstract class building { int a, b, c; abstract int show(); abstract float talk(); int call() { System.out.println("HI"); return 10; } } interface buildings { final int a = 10; int show(); int asdasd(); float asdasdasd(); } interface electonic { double k(); void showing(); } class yourHome implements buildings, electonic { @Override public double k() { // TODO Auto-generated method stub return 0; } @Override public void showing() { // TODO Auto-generated method stub } @Override public int show() { // TODO Auto-generated method stub return 0; } @Override public int asdasd() { // TODO Auto-generated method stub return 0; } @Override public float asdasdasd() { // TODO Auto-generated method stub return 0; } } class myHome extends building { @Override int show() { // TODO Auto-generated method stub return 0; } @Override float talk() { // TODO Auto-generated method stub return 0; } } public class Main { public static void main(String[] args) { } }
0
0
6
leejyjulia
2020년 7월 09일
In 소스 코드 제출
import java.util.Scanner; //import java.util.Scanner; // //class Phone { // private String name, tel; // public Phone(String name, String tel) { // this.name = name; // this.tel = tel; // } // public String getName() { // return name; // } // public String getTel() { // return tel; // } //} // //public class Main { // public static void main(String[] args) { // Phone [] phone = new Phone[2]; // // Scanner scanner = new Scanner(System.in); // for (int i=0; i<phone.length; i++) { // System.out.print("이름과 전화번호 입력>>"); // String name = scanner.next(); // String tel = scanner.next(); // phone[i] = new Phone(name,tel); // // } // // for (int i=0; i<phone.length;i++) // System.out.println(phone[i].getName()+ "의 번호 " + phone[i].getTel()); // scanner.close(); // } //} //import java.util.Scanner; //class Rect { // private int w,h; // public Rect(int w, int h) { // this.w = w; // this.h = h; // } // public int getArea() { // return w*h; // } //} // //public class Main { // public static void main(String[] args) { // Rect [] rect = new Rect[4]; // // // Scanner scanner = new Scanner(System.in); // for (int i=0; i<rect.length;i++) { // System.out.print((i+1)+" 너비와 높이 >>"); // int w = scanner.nextInt(); // int h = scanner.nextInt(); // rect[i] = new Rect(w,h); // } // // System.out.println("저장하였습니다..."); // System.out.print("사각형의 전체 합은 "); // int sum = 0; // for (int i=0; i<rect.length; i++) { // System.out.print(rect[i].getArea()); // sum += rect[i].getArea(); // } // System.out.println(sum); // } //} //import java.util.Scanner; // //class Phone { // String name,tel; // public Phone (String name, String tel) { // this.name = name; // this.tel = tel; // } // public String getName() { // return name; // } // public String getTel() { // return tel; // } // public String tt(String name) { // return (name+"의 번호는 " + tel + "입니다."); // } //} // //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // System.out.print("인원수>>"); // int n = t.nextInt(); // Phone [] phone = new Phone[n]; // // Scanner scanner = new Scanner(System.in); // for (int i=0; i<phone.length;i++) { // System.out.print("이름과 전화번호(번호는 연속적으로 입력)>>"); // String name = scanner.next(); // String tel = scanner.next(); // phone [i] = new Phone(name,tel); // } // // System.out.println("저장되었습니다..."); // // for(;;) { // System.out.print("검색할 이름>>"); // String name = scanner.next(); // if(name.equals("exit")) { // System.out.print("프로그램을 종료합니다..."); // break; // } // boolean check = true; // for (int i=0; i<phone.length; i++) { // if (name.equals(phone[i].getName())) { // System.out.println(phone[i].tt(name)); // check = false; // break; // } // } // if (check) { // System.out.println(name+" 이 없습니다."); // } // } // } //} //class Circle { // private int radius; // public Circle(int radius) { // this.radius = radius; // } // public int getRadius() { // return this.radius; // } // public void setRadius(int radius) { // this.radius = radius; // } //} //class CircleManager { // static void copy(Circle src, Circle dest) { // dest.setRadius(src.getRadius()); // } // static boolean equals(Circle a, Circle b) { // if (a.getRadius() == b.getRadius()) { // return true; // } // else { // return false; // } // // } //} // //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // Circle pizza = new Circle(5); // Circle waffle = new Circle(1); // // boolean res = t.nextBoolean(); // // if (res==true) // System.out.println("pizza와 waffle 크기 같음"); // else // System.out.println("pizza와 waffle 크기 다름"); // // CircleManager.copy(pizza, waffle); // res = (CircleManager.equals(pizza, waffle)); // if (res==true) // System.out.println("pizza와 waffle 크기 같음"); // else // System.out.println("pizza와 waffle 크기 다름"); // } //}
0
0
6
leejyjulia
2020년 7월 08일
In 소스 코드 제출
//import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // int k=1; // // int arr[][] = new int [n][n]; // // for(int i=0; i<n; i++) { // for(int j=0; j<n; j++) { // arr[i][j] = k++; // } // } // // for(int i=0; i<n; i++) { // for(int j=n-1; j>=0; j--) { // System.out.print(arr[i][j] +" "); // } // System.out.println(); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // int k = 1; // int a[][] = new int [n][n]; // // for (int i=0; i<n;i++) { // for (int j=0;j<n;j++) { // a[i][j] = k++; // } // } // // for (int i=n-1; i>=0; i--) { // for (int j=0;j<n; j++) { // System.out.print(a[j][i] + " "); // } // System.out.println(); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // int m = t.nextInt(); // int k = n*m; // int a[][] = new int [n][m]; // // for (int i=0; i<n; i++) { // for (int j=0;j<m;j++) { // a[i][j] = k--; // } // } // // for (int i=0; i<n; i++) { // for (int j=m-1; j>=0; j--) { // System.out.print(a[i][j]+" "); // } // System.out.println(); // } // } //} //public class Main { // int radius; // String name; // // public double getArea() { // return 3.14*radius*radius; // } // // public static void main(String[] args) { // Main pizza; // pizza = new Main(); // pizza.radius = 10; // pizza.name = "Java Pizza"; // double area = pizza.getArea(); // System.out.println(pizza.name + "의 면적은 " + area); // // Main donut = new Main(); // donut.radius = 2; // donut.name = "Java Donut"; // area = donut.getArea(); // System.out.println(donut.name + "의 면적은 " + area); // } //} //import java.util.*; // //class rectt { // int w; // int h; // public int getArea() { // return w*h; // } //} // //public class Main { // public static void main(String[] args) { // rectt rect = new rectt(); // Scanner scanner = new Scanner(System.in); // System.out.print(">> "); // rect.w = scanner.nextInt(); // rect.h = scanner.nextInt(); // System.out.println("사각형의 면적은 " + rect.getArea()); // scanner.close(); // } //} //public class Main { // int radius; // String name; // // public Main() { // radius = 1; name = ""; // } // // public Main(int r, String n) { // radius = r; name = n; // } // // public double getArea() { // return 3.14*radius*radius; // } // // public static void main(String[] args) { // Main pizza = new Main(10, "Java Pizza"); // double area = pizza.getArea(); // System.out.println(pizza.name + "의 면적은 " + area); // // Main donut = new Main(); // donut.name = "donut pizza"; // area = donut.getArea(); // System.out.println(donut.name +"의 면적은 " + area); // } //} //public class Main { // String title; // String author; // public Main(String t) { // title = t; // author = "작자미상"; // } // public Main(String t, String a) { // title = t; // author = a; // } // // public static void main(String[] args) { // Main littlePrince = new Main("어린왕자","생텍쥐페리"); // // Main loveStory = new Main("춘향전"); // System.out.println(littlePrince.title + " " + littlePrince.author); // System.out.println(loveStory.title + " " + loveStory.author); // } //} //public class Main { // String title; // String author; // // void show( ) { // System.out.println(title + " " + author); // } // // public Main () { // this("",""); // System.out.println("생성자 호출됨"); // } // // public Main(String title) { // this(title,"작자미상"); // } // // public Main(String title, String author) { // this.title = title; // this.author = author; // } // // public static void main(String[] args) { // Main littlePrince = new Main("어린왕자", "생텍쥐페리"); // Main loveStory = new Main("춘향전"); // Main emptyBook = new Main (); // loveStory.show(); // } //} //class Circle { // int radius; // public Circle (int radius) { // this.radius = radius; // } // public double getArea() { // return 3.14*radius*radius; // } //} // //public class Main { // public static void main(String[] args) { // Circle [] c; // c = new Circle[5]; // // for(int i=0; i<c.length; i++) // c[i] = new Circle (i); // // for(int i=0;i<c.length; i++) // System.out.print((int)(c[i].getArea()) + " "); // } //} //class parents { // public int a; // private int b; // protected int c; // // public int getB() { // return b; // } // // public void setB(int b) { // if(b>0) // this.b = b; // } // // void talk() { // b = 10; // } // //} // //public class Main { // public static void main(String[] args) { // parents p = new parents(); // // } //} //import java.util.Scanner; // //class Book { // String title, author; // public Book(String title, String author) { // this.title = title; // this.author = author; // } //} //public class Main { // public static void main(String[] args) { // Book [] book = new Book[2]; // // Scanner scanner = new Scanner(System.in); // for (int i=0; i<book.length; i++) { // System.out.print("제목>>"); // String title = scanner.nextLine(); // System.out.print("저자>>"); // String author = scanner.nextLine(); // book[i] = new Book(title,author); // } // // for(int i=0; i<book.length;i++) // System.out.print("("+book[i].title + ", "+book[i].author+")"); // // scanner.close(); // } //} //public class Main { // String mySong; // String yourSong; // public String getTitle() { // // } // //} //class Song { // String title; // Song() { // // } // Song(String title) { // this.title = title; // } // public String getTitle() { // return title; // } // //} // //public class Main { // public static void main(String[] args) { // Song mySong = new Song("ASDASD"); // Song yourSong = new Song("kjdhf"); // System.out.println("My song is "+mySong.getTitle()); // System.out.println("Your song is "+yourSong.getTitle()); // } //}
0
0
3
leejyjulia
2020년 7월 07일
In 소스 코드 제출
import java.util.*; public class Main { public static void main(String[] args) { Scanner t = new Scanner(System.in); int a [][] = new int [10][10]; int x = 1; int y = 1; for (int i=0; i<a.length; i++) { for (int j=0; j<a.length; j++) { a[i][j] = t.nextInt(); } } for(;;) { if(a[x][y]==2) { a[x][y] = 9; break; } else if(a[x][y]==0) { a[x][y] = 9; } if(a[x][y+1]!=1) { y++; } else { if(a[x+1][y]!=1) { x++; } else { break; } } } for (int i=0;i<10;i++) { for (int j=0;j<10;j++) { System.out.print(a[i][j]+ " "); } System.out.println(); } } }
0
0
2
leejyjulia
2020년 7월 02일
In 소스 코드 제출
//import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // int k=1; // // int arr[][] = new int [n][n]; // // for(int i=0; i<n; i++) { // for(int j=0; j<n; j++) { // arr[i][j] = k++; // } // } // // for(int i=0; i<n; i++) { // for(int j=0; j<n; j++) { // System.out.print(arr[i][j] +" "); // } // System.out.println(); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // int k=1; // // int arr[][] = new int [n][n]; // // for (int i=0; i<n; i++){ // for (int j=0; j<n; j++) { // arr[i][j] = k++; // } // } // for(int i=0; i<n; i++) { // for(int j=0; j<n; j++) { // System.out.print(arr[j][i]+" "); // } // System.out.println(); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // int m = t.nextInt(); // int k = n*m; // // int a[][] = new int [n][m]; // // for (int i=0; i<n; i++) { // for (int j=0; j<m; j++) { // a[i][j] = k--; // } // } // for (int i=0; i<n; i++) { // for (int j=0; j<m; j++) { // System.out.print(a[i][j]+" "); // } // System.out.println(); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // int m = t.nextInt(); // int k = n*m; // // int a [][] = new int [n][m]; // // for (int i=0; i<m; i++) { // for (int j=0; j<n; j++) { // a[j][i] = k--; // } // } // for (int i=0; i<n; i++) { // for (int j=0;j<m; j++) { // System.out.print(a[i][j]+" "); // } // System.out.println(); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // int a[][] = new int [n][n]; // // for(int i=0; i<n; i++) { // a[i][0] = t.nextInt(); // } // // for (int i=1; i<n; i++) { // for (int j=1; j<=i; j++) { // a[i][j] = a[i][j-1] - a[i-1][j-1]; // } // } // for (int i=0; i<n; i++) { // for (int j=0; j<=i; j++) { // System.out.print(a[i][j]+" "); // } // System.out.println(); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t= new Scanner(System.in); // // // int a[][] = new int [11][10]; // // for(int i=0; i<a.length; i++) { // for(int j=0; j<a[i].length; j++) { // a[i][j] = t.nextInt(); // } // } // // for (int j=0; j<10; j++) { // if (a[10][j]>0) { // int i=9; // for (i=9; i>=0; i--) { // if (a[i][j]>0) { // System.out.println(j+1 +" crash"); // break; // } // else if (a[i][j]<0) { // System.out.println(j+1+" fall"); // break; // } // } // if (i==-1) { // System.out.println(j+1+" safe"); // } // } // } // // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // int x=0; // int y=n/2; // int a[][] = new int [n][n]; // // // for(int k=1; k<=n*n; k++) { // a[x][y] = k; // // if (k%n!=0) { // if (x==0) { // x=n-1; // } // else // { // x--; // // } // if (y==n-1) { // y=0; // } // else // { // y++; // } // } // else { // x++; // } // } // // for(int i=0; i<n; i++) { // for(int j=0; j<n; j++) { // System.out.print(a[i][j] +" "); // } // System.out.println(); // } // } //}
0
0
3
leejyjulia
2020년 7월 01일
In 소스 코드 제출
//import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // for(;;) { // int n = t.nextInt(); // if(n==0) { // break; // } // System.out.println(n); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int a[] = new int [24]; // int k; // // // int n = t.nextInt(); // for (int i=0; i<n; i++) { // k = t.nextInt(); // a[k]++; // } // // for (int i=1; i<=23; i++) { // // System.out.print(a[i]+" "); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int a[] = new int [11]; // int k; // // for (int i=1; i<=10; i++) { // a[i] = t.nextInt(); // } // k = t.nextInt(); // System.out.println(a[k]); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // // int a[] = new int [10000000]; // int n = t.nextInt(); // int k; // // for (int i=0; i<n; i++) { // k = t.nextInt(); // a[k]=1; // } // int m = t.nextInt(); // for(int i=0; i<m; i++) { // k = t.nextInt(); // System.out.print(a[k]+" "); // } // // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // if (n==0) { // System.out.println("0"); // } // // int a[] = new int [35]; // int i; // // for (i=0; n>0 ;i++) { // a[i] = n%2; // n=n/2; // } // i--; // for (int j=i; j>=0;j--) { // System.out.print(a[j]); // } // } //}
0
0
8
leejyjulia
2020년 6월 30일
In 소스 코드 제출
//import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int n = t.nextInt(); // // for (int i=0; i<n; i++) { // for (int j=0; j<=i; j++) { // System.out.print("*"); // } // System.out.println(); // } // for (int i=1; i<n; i++) { // for (int j=i; j<n;j++) { // System.out.print("*"); // } // System.out.println(); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int n = t.nextInt(); // // for(int i=0; i<(n+1)/2; i++) { // for(int j=i; j<(n/2); j++) { // System.out.print(" "); // } // for(int j=0; j<=i*2; j++) { // System.out.print("*"); // } // // System.out.println(); // } // //// for (int i=0; i<n; i++) { //// for (int j=2; j<3; i--) { //// System.out.print(" "); //// } //// for (int j=4; j>3; i++) { //// System.out.print(" "); //// } //// for (int j=3; j<=3; j--) { //// System.out.print("*"); //// } //// for(int j=4; j>4; j++) { //// System.out.print("*"); //// } //// System.out.println(); //// } // } //} //import java.util.*; // //public class Main { // // public static void main(String[] args) { // // Scanner t = new Scanner(System.in); // // // // int n = t.nextInt(); // // // // for(int i=0; i<n; i++) { // // for(int j=0; j<n; j++) { // System.out.printf("(%d %d)\t", i, j); // // } // // System.out.println(); // // } // // } // //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // int k = t.nextInt(); // // for (int i=0; i<n;i++) { // for (int j=0; j<n; j++) { // if (i==0||i==n-1||j==0||j==n-1|| (i+j+1)%k==0 ) { // System.out.print("*"); // } // else { // System.out.print(" "); // } // } // System.out.println(); // } // } //} //import java.util.*; // //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // String s = t.next(); // System.out.println(s); // // for(int i=0; i<s.length(); i++) { // System.out.println(s.charAt(i)); // } // int n = t.nextInt(); // int a[] = new int[n]; // // a[0] ~ a[n-1] // // for(int i=0; i<n; i++) { // a[i] = t.nextInt(); // } // // for(int i=0; i<n; i++) { // System.out.println(a[i]); // } // // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int n = t.nextInt(); // int a[] = new int[n]; // // for (int i=0; i<n; i ++) { // a[i] = t.nextInt(); // } // for (int i=n-1; i>=0; i--) { // System.out.print(a[i]+" "); // } // // // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // int a[] = new int [n]; // // for (int i=0; i<n; i++) { // a[i] = t.nextInt(); // } // for (int i=0; i<n; i++) { // System.out.println(a[i]); // } // for (int i=0; i<n; i++) { // System.out.println(a[i]); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // int a[] = new int [n]; // int sum = 0; // // for (int i=0 ;i<n-1; i++) { // a[i] = t.nextInt(); // sum += a[i]; // } // for (int i=0; i<1; i++) { // System.out.println((((n+1)*n)/2)-sum); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // int a[] = new int [n]; // // // for (int i=0; i<n; i++) { // a[i] = t.nextInt(); // } // for (int i=0; i<n; i++) { // for(int k=0; k<n;k++) { // System.out.print(a[ (i+k)%n ]+" "); // } // System.out.println(); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // int a[] = new int [n]; // // for (int i=0; i<n; i++) { // a[i] = t.nextInt(); // } // for (int i=0; i<n; i++) { // System.out.print(i+1+": "); // for (int k=0; k<n; k++) { // if(i!=k) { // if (a[i] < a[k]) { // System.out.print("< "); // } // else if (a[i]>a[k]) { // System.out.print("> "); // } // else if (a[i]==a[k]) { // System.out.print("= "); // } // } // } // System.out.println(); // } // } //}
0
0
6
leejyjulia
2020년 6월 25일
In 소스 코드 제출
//import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // for(int i=1; i<=a; i++) { // System.out.print("*"); // } // } //} //import java.util.*; // //public class Main { //public static void main(String[] args) { // // // Scanner t = new Scanner(System.in); // // int a = t.nextInt(); // int b = t.nextInt(); // // for (int i=a; i<=b; i++) { // // if (i%2==1) { // System.out.print(i+" "); // } // // } // } //} // // //import java.util.*; //public class Main{ // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int a = t.nextInt(); // int sum= 0; // // for (int i=1; i<=a; i++) { // sum= sum+i; // // } // System.out.println(sum); // // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int a = t.nextInt(); // int sum = 0; // // for (int i=1; i<=a; i++) { // if (i%2==0) { // sum = sum+i; // } // } // System.out.println(sum); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // int sum = 0; // for (int i=1; i<=n; i++) { // int a = t.nextInt(); // sum = sum+a; // } // System.out.println(sum); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // int sum = 0; // for (int i=1; i<=n; i++) { // int a = t.nextInt(); // // if (a%5==0) { // sum = sum + a; // } // } // System.out.println(sum); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // int sum = 0; // // for (int i=1; i<=n; i++) { // int a = t.nextInt(); // // if (a%2==0) { // sum = sum +1; // } // } // System.out.println(sum); // } //} //import java.util.*; // //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // int max = 0; // for(int i=0; i<n; i++) { // int a = t.nextInt(); // // if(max < a) { // max = a; // } // } // System.out.println(max); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int max = -1000000;int min = 1000000; // for(int i=0; i<5; i++) { // int a = t.nextInt(); // // if(max < a) { // max = a; // } // if (min > a) { // min = a; // } // } // System.out.println(max); // System.out.println(min); // // } //} // //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // // for (int i=2; i<=n/2; i++) { // if (n%i==0) { // int k = i; // int p = n/i; // // int kCnt = 0; // int pCnt = 0; // for(int j=1; j<=k; j++) { // if(k%j==0) { // kCnt++; // } // } // // for (int b=1; b<=p; b++) { // if (p%b==0) { // pCnt++; // } // } // // if(kCnt == 2 && pCnt == 2) { // if (p>k) { // System.out.println(k+" "+p); // return ; // } // else if (k>p) { // System.out.print(p+" "+k); // return ; // } // } // } // } // System.out.println("wrong number"); // } //} //import java.util.*; // // //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // // for(int i=0; i<n; i++) { // for(int j=0; j<n; j++) { // System.out.printf("(%d %d)\t", i, j); // } // System.out.println(); // } // } //} //import java.util.*; // // //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // // for(int i=0; i<n; i++) { // for(int j=0; j<n; j++) { // if(i==i) { // System.out.print("*"); // } // } // System.out.println(); // } // } //} //import java.util.*; //public class Main{ // public static void main(String[] args) { // Scanner t= new Scanner(System.in); // // int n = t.nextInt(); // // for (int i=0; i<n; i++){ // for (int j=0; j<n; j++) { // if (i==0||i==n-1||j==0||j==n-1) { // System.out.print("*"); // } // else { // System.out.print(" "); // } // } // System.out.println(); // } // } //} //import java.util.*; //public class Main{ // public static void main(String[] args) { // Scanner t= new Scanner(System.in); // // int n = t.nextInt(); // // for (int i=0; i<n; i++){ // for (int j=0; j<n; j++) { // if (i==0||i==n-1||j==0||j==n-1||i==j||j+i==n-1) { // System.out.print("*"); // } // else { // System.out.print(" "); // } // } // System.out.println(); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // // for (int i=0; i<n; i++) { // for (int j=0; j<n; j++) { // if (i==0||i==n-1||j==0||j==n-1||i==j||j+i==n-1||j==(n-1)/2||i==(n-1)/2) { // System.out.print("*"); // } // else { // System.out.print(" "); // } // } // System.out.println(); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // // for (int i=0; i<n; i++) { // for (int j=0; j<=i; j++) { // System.out.print("*"); // } // System.out.println(); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // // for (int i=0; i<n; i++) { // for (int j=i; j<n; j++) { // System.out.print("*"); // } // System.out.println(); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int n = t.nextInt(); // // for (int i=n-1; i>=0; i--) { // for (int j=i; j<n-1;j++) { // System.out.print(" "); // } // for (int j=i; j>=0; j--) { // System.out.print("*"); // } // System.out.println(); // } // } //}
0
0
4
leejyjulia
2020년 6월 24일
In 소스 코드 제출
//import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // int b = t.nextInt(); // int c = t.nextInt(); // // if(a>b && a>c) { // if(b>c) { // System.out.println(b); // } // else { // System.out.println(c); // } // } // else if (b>a && b>c) { // if(a>c) { // System.out.println(a); // } // else { // System.out.println(c); // } // } // else if (c>a && c>b) { // if(a>b) { // System.out.println(a); // } // else { // System.out.println(b); // } // } // else { // System.out.println(a); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // int b = t.nextInt(); // int c = (90-a)/5; // if (a%5==0) { // if (84>a) { // System.out.println(b+c); // } // } // else { // System.out.println(b+(c+1)); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // int b = t.nextInt(); // int c = t.nextInt(); // if (a>b && a>c) { // if((b+c)>a) { // System.out.println("yes"); // } // else { // System.out.println("no"); // } // } // else if (b>a && b>c) { // if((a+c)>b) { // System.out.println("yes"); // } // else { // System.out.println("no"); // } // } // else if (c>a && c>b) { // if ((a+b)>c) { // System.out.println("yes"); // } // else { // System.out.println("no"); // } // } // else if (a==b&&b==c) { // System.out.println("yes"); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // int b = t.nextInt(); // int c = t.nextInt(); // int d = t.nextInt(); // switch (a+b+c+d) { // case 1: // System.out.println("도"); // break; // case 2: // System.out.println("개"); // break; // case 3: // System.out.println("걸"); // break; // case 4: // System.out.println("윷"); // break; // default: // System.out.println("모"); // break; // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // switch (a/10) { // case 10: // case 9: // System.out.println("A"); // break; // case 8: // System.out.println("B"); // break; // case 7: // System.out.println("C"); // break; // case 6: // System.out.println("D"); // break; // default: // System.out.println("F"); // break; // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // for(int i=1;i<=a;i++) { // System.out.print(i+" "); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // int b = t.nextInt(); // if (a<b) { // for(int i=a; i<=b; i++) { // System.out.print(i+" "); // } // } // else if (a>b) { // for(int i=b; i<=a; i++) { // System.out.print(i+" "); // } // } // else { // System.out.println(a); // } // } //} import java.util.*; public class Main { public static void main(String[] args) { Scanner t = new Scanner(System.in); float a = t.nextFloat(); float b = t.nextFloat(); for(float i=a; i<=b; i+=0.01) { System.out.printf(i+" "); } } }
0
0
5
leejyjulia
2020년 6월 23일
In 소스 코드 제출
//import java.util.*; // //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // boolean a = t.nextBoolean(); // // System.out.println(!a); // // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // boolean a = t.nextBoolean(); // boolean b = t.nextBoolean(); // System.out.println(a&&b); //} //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // boolean a = t.nextBoolean(); // boolean b = t.nextBoolean(); // System.out.println(a||b); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // boolean a = t.nextBoolean(); // boolean b = t.nextBoolean(); // System.out.println(!(a&&b)); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // boolean a = t.nextBoolean(); // boolean b = t.nextBoolean(); // System.out.println((a&&b)||!(a||b)); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // boolean a = t.nextBoolean(); // boolean b = t.nextBoolean(); // System.out.println(!(a||b)); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // int b = t.nextInt(); // System.out.println(a>b?a:b); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // int b = t.nextInt(); // int c = t.nextInt(); // System.out.println((a<b?a:b)<c?(a<b?a:b):c); // } //} // //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // System.out.println(~a); //} //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // int b = t.nextInt(); // System.out.println(a&b); // } //} //import java.util.*; //public class Main { //public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // int b = t.nextInt(); // System.out.println(a|b); // } // } //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // int b = t.nextInt(); // System.out.println(a|b); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // int b = t.nextInt(); // System.out.println(a^b); // } //} //import java.util.*; // //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // int b = t.nextInt(); // // if(a>b) { // System.out.println("BETTER"); // } // else if(a==b) { // // } // else if(a==0) { // // } // else { // // } // // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // int b = t.nextInt(); // if(a>b) { // System.out.println(">"); // } // else if(a<b) { // System.out.println("<"); // } // else if(a==b) { // System.out.println("="); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // int b = t.nextInt(); // if(a>b) { // System.out.println(a-b); // } // else { // System.out.println(b-a); // // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // if (a%7==0) { // System.out.println("multiple"); // } // else { // System.out.println("not multiple"); // } // } //} //import java.util.*; //public class Main { //public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // if (a%2==0) { // System.out.println("even"); // } // else { // System.out.println("odd"); // } //} //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // int b = t.nextInt(); // int c = t.nextInt(); // if (a==b&&b==c) { // System.out.println("정삼각형"); // } // else if ((a*a+b*b)==c*c||(b*b+c*c==a*a)||(a*a+c*c==b*b)) { // System.out.println("직각삼각형"); // } // else if ((a+b)<c||(b+c)<a||(a+c)<b) { // System.out.println("삼각형아님"); // } // else if (a+b==c||a+c==b||c+b==a) { // System.out.println("삼각형아님"); // } // else if (a==b||b==c||a==c) { // System.out.println("이등변삼각형"); // } // else { // System.out.println("삼각형"); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // int b = ((a%10*10+a/10)*2)%100; // System.out.println(b); // if (b<=50) { // System.out.println("GOOD"); // } // else { // System.out.println("OH MY GOD"); // } // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // int b = t.nextInt(); // if (b<30) { // if (a==0) { // System.out.print(23+" "); // System.out.println(b+30); // } // else { // System.out.print(a-1+" "); // System.out.println(b+30); // } // } // else if (b>=30) { // System.out.print(a+" "); // System.out.println(b-30); // } // } //}
0
0
5
leejyjulia
2020년 6월 18일
In 소스 코드 제출
//public class Main { // public static void main(String[] args) { // System.out.println("Hello"); // } //} //public class Main { // public static void main(String[] args) { // System.out.println("Hello World"); // } //} //public class Main { // public static void main(String[] args) { // System.out.println("Hello"); // System.out.println("World"); // } //} //public class Main { // public static void main(String[] args) { // System.out.println("'Hello'"); // } //} //public class Main { // public static void main(String[] args) { // System.out.println("\"Hello World\""); // } //} //public class Main { // public static void main(String[] args) { // System.out.print("HELLO\n\nWORLD"); // System.out.println("WORLD"); // System.out.printf("%.2f", 3.141592); // } //} //public class Main { // public static void main(String[] args) { // System.out.println("\"!@#$%^&*()\""); // } //} //public class Main { // public static void main(String[] args) { // System.out.println("\"C:\\Download\\hello.cpp\""); // } //} //import java.util.*; // //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // // int a = t.nextInt(); // int b = t.nextInt(); // small int // long c = t.nextLong(); // big int // double d = t.nextDouble(); // big float // float e = t.nextFloat(); // small float // char f = t.next().charAt(0); // // System.out.println(a+b); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int n = t.nextInt(); // System.out.println(n); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // float e = t.nextFloat(); // System.out.printf("%.6f", e); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // int b = t.nextInt(); // System.out.println(a+" "+b); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // float a = t.nextFloat(); // System.out.printf("%.2f",a); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // System.out.printf("%d %d %d", a, a, a); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // long a = t.nextLong(); // long b = t.nextLong(); // System.out.println(a+b); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // long a = t.nextLong(); // long b = t.nextLong(); // System.out.println(a+b); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // char f = t.next().charAt(0); // System.out.printf("%c", f+1); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // int b = t.nextInt(); // System.out.printf("%d",a/b); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // int b = t.nextInt(); // System.out.printf("%d",a%b); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // long a = t.nextLong(); // System.out.printf("%d",++a); // } //} //import java.util.*; //public class Main { // public static void main(String[] args) { // Scanner t = new Scanner(System.in); // int a = t.nextInt(); // int b = t.nextInt(); // System.out.println(a+b); // System.out.println(a-b); // System.out.println(a*b); // System.out.println(a/b); // System.out.println(a%b); // System.out.printf("%.2f",(double)a/b); // } //} import java.util.*; public class Main { public static void main(String[] args) { Scanner t = new Scanner(System.in); long a = t.nextLong(); long b = t.nextLong(); long c = t.nextLong(); System.out.println(a+b+c); System.out.printf("%.1f",(double)(a+b+c)/3); } }
0
0
5

leejyjulia

더보기
bottom of page