알고리즘/문제
파티가 끝나고 난 뒤
미케코코
2019. 7. 8. 14:21
문제
이문제는 다른 설명이 필요하지 않을것같다..
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
import java.util.StringTokenizer;
public class Main{
public static int [] arr;
public static void main(String[] args) {
Scanner sc= new Scanner(System.in);
int L=sc.nextInt();
int M=sc.nextInt();
arr=new int[5];
int multiple=L*M;
for(int i=0;i<5;i++)
{
arr[i]=sc.nextInt();
}
for(int i=0;i<5;i++)
{
if(i!=4)
{
System.out.print(arr[i]-multiple+" ");
}
else
{
System.out.println(arr[i]-multiple);
}
}
}
}
http://colorscripter.com/info#e" target="_blank" style="color:#4f4f4ftext-decoration:none">Colored by Color Scripter
|
https://www.acmicpc.net/problem/2845
2845번: 파티가 끝나고 난 뒤
문제 파티가 끝나고 나면, 사람들은 누가 파티에 왔는지와 얼마나 많은 사람들이 왔는지를 궁금해한다. 보통 파티는 매우 크게 열리기 때문에, 정확하게 몇 명이 참가했는지 알 수가 없다. 지난주 토요일에 상근이는 자신의 3학년 진학을 기념하면서 매우 성대한 파티를 열었다. 그리고, 상근이는 1m2당 몇 명의 사람이 있었는지 알고있다. 상근이의 파티는 정말 엄청난 규모였기 때문에, 대부분의 신문에도 기사가 실렸다. 상근이는 서로 다른 5개의 신문을 보면서 그
www.acmicpc.net