We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f36727 commit 63f7eccCopy full SHA for 63f7ecc
1 file changed
정건우/7주차/260211.java
@@ -0,0 +1,30 @@
1
+import java.io.BufferedReader;
2
+import java.io.IOException;
3
+import java.io.InputStreamReader;
4
+import java.util.StringTokenizer;
5
+
6
+public class BOJ_B2_10539_수빈이와수열 {
7
8
+ public static void main(String[] args) throws IOException {
9
+ BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
10
+ StringBuilder sb = new StringBuilder();
11
12
+ int N = Integer.parseInt(br.readLine());
13
+ long sum = 0;
14
15
+ StringTokenizer st = new StringTokenizer(br.readLine());
16
+ for (int i = 1; i <= N; i++) {
17
+ int n = Integer.parseInt(st.nextToken());
18
19
+ long a = (long)n * i - sum;
20
+ sum += a;
21
22
+ sb.append(a).append(' ');
23
+ }
24
25
+ sb.setLength(sb.length()-1);
26
+ System.out.println(sb.toString());
27
28
29
30
+}
0 commit comments