# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
93483 | 2019-01-08T18:25:08 Z | jwk | Nadan (COCI18_nadan) | Java 11 | 0 ms | 0 KB |
import java.util.*; import java.io.*; public class Main { 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); } }