답안 #93484

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
93484 2019-01-08T18:25:38 Z jwk Nadan (COCI18_nadan) Java 11
50 / 50
124 ms 11612 KB
import java.util.*;
import java.io.*;
public class nadan {
   public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      
      int K = sc.nextInt();
      int N = sc.nextInt();
      
      int sofar = 1;
      for(int i = 0; i < N - 1; i++) {
         System.out.println(sofar);
         K -= sofar;
         sofar++;
      }
      System.out.println(K);
   }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 102 ms 11612 KB Output is correct
2 Correct 92 ms 10896 KB Output is correct
3 Correct 92 ms 10912 KB Output is correct
4 Correct 91 ms 11020 KB Output is correct
5 Correct 105 ms 10928 KB Output is correct
6 Correct 100 ms 11092 KB Output is correct
7 Correct 102 ms 10856 KB Output is correct
8 Correct 91 ms 10908 KB Output is correct
9 Correct 124 ms 11008 KB Output is correct
10 Correct 106 ms 10856 KB Output is correct