Created
March 22, 2018 02:01
-
-
Save jwon0615/629b9627aae6ff8d1997e7b95102e082 to your computer and use it in GitHub Desktop.
1508 : 나도 IQ 150
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
int n, i, j, map[21][21]; | |
scanf("%d", &n); | |
for(i = 1; i <= n; i++) | |
scanf("%d", &map[i][1]); | |
for(i = 2; i <= n; i++) | |
for(j = 2; j <= i; j++) | |
map[i][j] = map[i][j-1] - map[i-1][j-1]; | |
for(i = 1; i <= n; i++, puts("")) | |
for(j = 1; j <= i; j++) | |
printf("%d ", map[i][j]); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment