Skip to content

Commit 72ccda1

Browse files
authored
Create c1092.java
1 parent 74c4bf6 commit 72ccda1

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/codeup100/c1092.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package codeup100;
2+
3+
import java.util.Scanner;
4+
5+
public class c1092 {
6+
7+
public static void main(String[] args) {
8+
Scanner sc = new Scanner(System.in);
9+
int a = sc.nextInt(); //유저1의 방문주기 3
10+
int b = sc.nextInt(); //유저2의 방문주기 7
11+
int c = sc.nextInt(); //유저3의 방문주기 9
12+
sc.close();
13+
14+
//최소공배수
15+
int day = 1;
16+
while(day%a!=0 || day%b!=0 || day%c!=0) day++;
17+
System.out.println(day);
18+
19+
}
20+
}

0 commit comments

Comments
 (0)