package test; import java.util.Scanner; public class Test2 { public static void main(String[] args) { Test2 test = new Test2(); Scanner in = new Scanner(System.in); int n = in.nextInt(); System.out.println(test.d(n));; } public int d(int n){ int count = 0; for(int i = 1 ; i
์ ๊ทผ๋ฐฉ๋ฒ 1. ์ ๋ ฅํ ์๊น์ง์ ๋ชจ๋ ์ผ์๋ฅผ ๋ํ๋ค. (ex 3์ => 31+28+31) 2. ํด๋น ์์ ๋ง์ง๋ง ์ผ์ - ์ ๋ ฅํ ์ผ์ (ex 3์ 10์ผ => 31 - 10 ) 3. ๋ชจ๋ ์ผ์ - (์ ๋ ฅ ์์ ๋ง์ง๋ง์ผ์ - ์ ๋ ฅ ์ผ์ ) = >totalDate 4. totalDate๋ฅผ 7๋ก ๋๋ ๋๋จธ์ง์ ๊ฐ์ ์์ผ๋ก ์ ์ (1=์, 2= ํ .... ) public static void main(String[] args) { int[] months = {31,28,31,30,31,30,31,31,30,31,30,31}; char[] days = {'์','ํ','์','๋ชฉ','๊ธ','ํ ','์ผ'}; int totalDate = 0; Scanner scanner = new Scanner(System.in); ..