-
Notifications
You must be signed in to change notification settings - Fork 26
초급반 / 이지우 / 돌게임 -9655, 합분해-2225, 선수과목-14567 #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package 돌게임.dlwldn30; | ||
|
||
import java.io.BufferedReader; | ||
import java.io.IOException; | ||
import java.io.InputStreamReader; | ||
|
||
public class Main { | ||
public static void main(String[] args) throws IOException { | ||
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); | ||
|
||
int N = Integer.parseInt(br.readLine()); | ||
|
||
if(N%2==0){ | ||
System.out.println("CY"); | ||
} | ||
else { | ||
System.out.println("SK"); | ||
} | ||
} | ||
} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 끝까지 화이팅입니다! |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package 선수과목.dlwldn30; | ||
|
||
import java.io.BufferedReader; | ||
import java.io.IOException; | ||
import java.io.InputStreamReader; | ||
|
||
public class Main { | ||
public static void main(String[] args) throws IOException { | ||
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); | ||
|
||
int N = Integer.parseInt(br.readLine()); | ||
int M = Integer.parseInt(br.readLine()); | ||
} | ||
} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 코드 제출 했을 때 정상 작동되나요 ?? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package 합분해.dlwldn30; | ||
|
||
import java.io.BufferedReader; | ||
import java.io.IOException; | ||
import java.io.InputStreamReader; | ||
|
||
public class Main { | ||
public static void main(String[] args) throws IOException { | ||
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); | ||
|
||
int N = Integer.parseInt(br.readLine()); | ||
int K = Integer.parseInt(br.readLine()); | ||
|
||
int[][] dp= new int[K+1][N+1]; | ||
|
||
for (int i = 0; i <= N; i++){ | ||
dp[1][i] = 1; | ||
} | ||
|
||
for (int i = 2; i <= K; i++){ | ||
for (int n = 0; n <= N; n++){ | ||
dp[i][n] = (dp[i][n-1] + dp[i-1][n]) % 1000000000; | ||
} | ||
} | ||
System.out.println(dp[K][N]); | ||
} | ||
|
||
} |
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 규칙이 간단해서 이렇게 작성하긴했는데 더 복잡해진다면 동적프로그래밍 점화식으로 어떻게 풀지 생각해보면 좋을거 같아요~