/*import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int arr[][] = new int[100][100];
for(int k=1;k<=4;k++)
{
int x1 = in.nextInt();
int y1 = in.nextInt();
int x2 = in.nextInt();
int y2 = in.nextInt();
for(int i=x1;i<x2;i++) {
for(int j=y1;j<y2;j++) {
arr[i][j]=1;
}
}
}
int sum=0;
for(int i=0;i<100;i++) {
for(int j=0;j<100;j++) {
sum=sum+arr[i][j];
}
}
System.out.println(sum);
}
}
import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int i,max=0,mi=1;
for(i=1;i<=9;i++) {
int k;
k=in.nextInt();
if(max<k) {
max=k;
mi=i;
}
}
System.out.println(max);
System.out.println(mi);
}
}
import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int i,n,sum=0;
int t=1;
n=in.nextInt();
for(i=1;i<=n;i++) {
int k=in.nextInt();
if(k==1){
sum+=t; //t : 연속으로 맞은 갯수
t++;
}
else {
t=1;
}
}
System.out.println(sum);
}
}
import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int h,r;
h=in.nextInt();
r=in.nextInt();
for(int k=1;k<=r;k++) {
for(int i=1;i<=h;i++)
{
for(int j=1;j<=i-1;j++) {
System.out.print(" ");
}
System.out.println("*");
}
for(int i=h-1;i>=1;i--) {
for(int j=1;j<=i-1;j++) {
System.out.print(" ");
}
System.out.println("*");
}
}
}
}
import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int h;
h=in.nextInt();
for(int i=1;i<=h;i++)
{
for(int j=1;j<=i;j++) {
System.out.print("*");
}
System.out.println();
}
for(int i=h-1;i>=1;i--) {
for(int j=1;j<=i;j++) {
System.out.print("*");
}
System.out.println();
}
}
}
*/
/*import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int arr[][] = new int[100][100];
for(int k=1;k<=4;k++)
{
int x1 = in.nextInt();
int y1 = in.nextInt();
int x2 = in.nextInt();
int y2 = in.nextInt();
for(int i=x1;i<x2;i++) {
for(int j=y1;j<y2;j++) {
arr[i][j]=1;
}
}
}
int sum=0;
for(int i=0;i<100;i++) {
for(int j=0;j<100;j++) {
sum=sum+arr[i][j];
}
}
System.out.println(sum);
}
}
import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int i,max=0,mi=1;
for(i=1;i<=9;i++) {
int k;
k=in.nextInt();
if(max<k) {
max=k;
mi=i;
}
}
System.out.println(max);
System.out.println(mi);
}
}
import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int i,n,sum=0;
int t=1;
n=in.nextInt();
for(i=1;i<=n;i++) {
int k=in.nextInt();
if(k==1){
sum+=t; //t : 연속으로 맞은 갯수
t++;
}
else {
t=1;
}
}
System.out.println(sum);
}
}
import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int h,r;
h=in.nextInt();
r=in.nextInt();
for(int k=1;k<=r;k++) {
for(int i=1;i<=h;i++)
{
for(int j=1;j<=i-1;j++) {
System.out.print(" ");
}
System.out.println("*");
}
for(int i=h-1;i>=1;i--) {
for(int j=1;j<=i-1;j++) {
System.out.print(" ");
}
System.out.println("*");
}
}
}
}
import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int h;
h=in.nextInt();
for(int i=1;i<=h;i++)
{
for(int j=1;j<=i;j++) {
System.out.print("*");
}
System.out.println();
}
for(int i=h-1;i>=1;i--) {
for(int j=1;j<=i;j++) {
System.out.print("*");
}
System.out.println();
}
}
}
#include<stdio.h>
int main()
{
int i,j,n;
scanf("%d",&n);
for(i=n-1;i>=0;i--)
{
for(j=1;j<=i;j++)
{
printf(" ");
}
for(j=1;j<=n;j++)
{
printf("*");
}
printf("\n");
}
return 0;
}
import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int i,j;
int h=in.nextInt();
int k=in.nextInt();
char d=in.next().charAt(0);
for(i=1;i<=h;i++) {
if(d=='L'){
for(j=1;j<=i-1;j++) {
System.out.print(" ");
}
}
else {
for(j=1;j<=h-i;j++) {
System.out.print(" ");
}
}
for(j=1;j<=k;j++) {
System.out.print("*");
}
System.out.println();
}
내용물
}
}*/
/*
import java.util.*;
class Bung{
int size; //크기
String con; // 내용물
String shape; //모양
}
public class Main{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
Bung a = new Bung(); //a객체 생성
a.con="cream"; // a의 필드 설정
System.out.println(a.con);
Bung b = new Bung();
b.con = "red bean";
System.out.println(b.con);
}
}
import java.util.*;
class Person{
String name;
String job;
int age;
void speak() //메소드 (함수)
{
System.out.println("안녕하세요 저는 "+name+"입니다.");
}
void setName(String newName)
{
name=newName;
}
}
public class Main{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
Person a = new Person();
a.name="patrick"; //1번방법
a.speak();
a.setName("doyun"); //2번방법 (추천)
a.speak();
a.job="student";
a.age = 80;
Person b = new Person();
b.name = "chloe";
b.job = "teacher";
b.age = 1000;
a.speak();
b.speak();
}
}
class Circle{
int radius;
String name;
public Circle() {}
public double getArea() {
return 3.14*radius*radius;
}
}
public class Main{
public static void main(String[] args) {
Circle pizza;
pizza = new Circle();
pizza.radius = 10;
pizza.name = "천재 민수 피자";
double area = pizza.getArea();
System.out.println(pizza.name+"의 면적은 "+area);
Circle donut = new Circle();{
donut.radius = 2;
donut.name = "불가물 피자";
area = donut.getArea();
System.out.println(donut.name + "의 면적은" + area);
}
}
}
import java.util.*;
class Rectangle{
int width;
int height;
public int getArea() {
return width*height;
}
}
public class Main {
public static void main(String[] args) {
Rectangle rect = new Rectangle();
Scanner sc = new Scanner(System.in);
System.out.print(">> ");
rect.width = sc.nextInt();
rect.height = sc.nextInt();
System.out.println("사각형의 면적은" + rect.getArea());
scanner.close();
}
}*/
/*
class Circle{
int radius; //반지름
String name; //이름
//생성자
Circle ()
{
radius = 100;
name = "몰라요";
}
Circle(int r)
{
this();
radius = r;
}
Circle(int r, String n)
{
radius = r;
name = n;
}
public double getArea() { // 원 넓이 구해주는 메소드
return 3.14*radius*radius;
}
}
public class Main {
public static void main(String[] args) {
Circle pizza = new Circle();
System.out.println(pizza.radius + ", "+pizza.name);
pizza.radius=95;
pizza.name="doyun";
System.out.println(pizza.radius + ", "+pizza.name);
Circle clock = new Circle(2,"doyun");
System.out.println(clock.radius + ", "+clock.name);
Circle donut = new Circle(18,"techer");
System.out.println(donut.radius + ", "+donut.name);
Circle jordy = new Circle(26);
System.out.println(jordy.radius + ","+jordy.name);
}
}*//*
import java.util.*;
class Book {
String title;
String author;
public Book()
{
this("","");
System.out.println("1번 생성자 호출됨");
}
public Book(String title) {
this.title = title;
author = "작자미상";
System.out.println("2번 생성자 호출됨");
}
public Book(String title,String author) {
this.title = title;
this.author = author;
System.out.println("3번 생성자 호출됨");
}
}
public class Main {
public static void main(String[] args) {
Book littleprince = new Book("어린왕자","생텍쥐페리");
Book loveStory = new Book("춘향전");
Book thriler = new Book();
//System.out.println(littleprince.title + " " + littleprince.author);
//System.out.println(loveStory.title + " " + loveStory.author);
}
}*//*
class Main{
int id;
public Main() {
this(0);
System.out.println("생성자 호출");
}
public Main(int x) {
this.id = x;
}
}
/*
class ConstructorExample{
int x;
public void setX(int x) {this.x = x; }
public int getX() { return x; }
public ConstructorExample()
{
}
public ConstructorExample(int x) {
this.x = x;
}
}
class Main{
public static void main(String[] args) {
ConstructorExample a = new ConstructorExample();
int n = a.getX();
}
}
class TV{
int year;
String name;
int inch;
public void show() {
System.out.println(name+"에서 만든 "+year+"년형"+inch+"인치 TV" );
}
public TV()
{
}
public TV(String name,int year,int inch)
{
this.name=name;
this.inch=inch;
this.year=year;
}
}
class Main{
public static void main(String[] args) {
TV myTV = new TV("LG",2017, 32);
myTV.show();
}
}
import java.util.*;
class Grade{
int math;
int science;
int english;
public int average() {
return (math+science+english)/3;
}
public Grade(int math,int science,int english)
{
this.math=math;
this.english=english;
this.science=science;
}
}
class Song{
String tittle;
String artist;
int year;
String country;
public Song() {}
public Song(String tittle,String artist,int year,String country) {
this.tittle=tittle;
this.artist=artist;
this.year=year;
this.country=country;
}
public void show() {
System.out.println(year + "년 " + country + "국적 의 " + artist + "가 부른" + tittle);
}
}
class Main {
public static void main(String[] args) {
//Song mySong = new Song("Dansing Queen","ABBA",1978,"스웨덴");
//Song mySong;
//mySong = new Song("Dansing Queen","ABBA",1978,"스웨덴");
//int [] array = new int[5]; // int 정수를 저장하는 변수가 5개 생성
Song[] mysong = new Song[5]; // Song 클래스 레퍼런스 변수 5개 생성 mysong[0] ~ mysong[4]
for(int i=0;i<5;i++)
mysong[i]=new Song();
//Song mySong = new Song("Dansing Queen","ABBA",1978,"스웨덴");
// Song mySong1 = new Song("Dansing Queen","ABBA",1978,"스웨덴");
// Song mySong2 = new Song("Dansing Queen","ABBA",1978,"스웨덴");
// Song mySong3 = new Song("Dansing Queen","ABBA",1978,"스웨덴");
//mySong.show();
}
}
// 2022 02 24 객체 배열 만들기
class Circle {
int radius;
public Circle(int radius) {
this.radius = radius;
}
public double getArea() {
return 3.14*radius*radius;
}
}
//length 길이 c.length c의 길이
public class Main{
public static void main(String[] args) {
Circle [] 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()) + " ");
}
}
import java.util.*;
class Book{
String tittle, auther;
public Book(String tittle, String auther) {
this.tittle = tittle;
this.auther = auther;
}
}
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 tittle = scanner.nextLine();
System.out.println("저자>>");
String author = scanner.nextLine();
book[i] = new Book(tittle, author);
}
for(int i=0; i<book.length; i++)
System.out.println("(" + book[i].tittle + ", " + book[i].auther + ")");
scanner.close();
}
}
public Human(String name,int age,double height,double weight) {
this.name=name;
}
*/
/*
class Human {
String name;
int age;
double weight, height;
Human(){}
Human(String name, int age, double weight, double height) {
this.name = name;
this.age = age;
this.weight = weight;
this.height = height;
}
}
public class Main {
public static void main(String[] args) {
Human aHuman = new Human("홍길동",21, 180.5, 73.2);
Human [] h; //배열의 이름
h = new Human[5]; //레퍼런스 배열
Human [] hh = new Human[5]; //레퍼런스 배열
for(int i=0;i<h.length;i++) h[i] = new Human(); //객체 생성
}
}
class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
Circle c [] = new Circle[3];
for(int i=0;i<c.length;i++) {
System.out.print("x,y,radius >>");
double x = scanner.nextDouble();
double y = scanner.nextDouble();
int radius = scanner.nextInt();
c[i] = new Circle(x,y,radius);
}
for(int i=0;i<c.length;i++) c[i].show();
scanner.close();
}
}
class Main {
static void replaceSpace(char a[]) {
for(int i=0;i<a.length;i++)
if(a[i] == ' ')
a[i] = ',';
}
static void printCharArray(char a[]) {
for(int i=0;i<a.length;i++)
System.out.print(a[i]);
System.out.println();
}
public static void main(String[] args) {
char c[] = {'T','h','i','s',' ','i','s',' ','a',' ','p','e','n','c','i','l','.'};
printCharArray(c);
replaceSpace(c);
printCharArray(c);
}
}
*//*
import java.util.*;
class Circle {
private double x, y;
int radius;
public Circle(double x, double y, int radius) {
this.x=x;
this.y=y;
this.radius=radius;
}
public void show() {
System.out.println("(" + x + "," + y + ")" + radius);
}
}
class Main {
public static void maxCircle(Circle c[])
{
int mi=0; //가장 큰 반지름을 가진 원의 위치
for(int i=0;i<c.length;i++)
{
if(c[mi].radius<c[i].radius)
{
mi=i;
}
}
System.out.print("가장 면적이 큰 원은 ");
c[mi].show();
}
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
Circle c [] = new Circle[3];
for(int i=0;i<c.length;i++) {
System.out.print("x,y,radius >>");
double x = scanner.nextDouble();
double y = scanner.nextDouble();
int radius = scanner.nextInt();
c[i] = new Circle(x,y,radius);
}
maxCircle(c);
scanner.close();
}
}*/
import java.util.*;
class Day{
private String work;
public void set(String work) { this.work = work;}
public String get() { return work;}
public void show() {
if(work ==null) System.out.println("없습니다.");
else System.out.println(work+"입니다");
}
}
public class Main{
public static void main(String[] args)
{
while(true)
{
System.out.println("할일(>>");
int n = sc.nextInt();
if(n==1 || n==2)
{
}
else
{
System.out.println("");
break;
}
}
}
}



