Skip to content

Instantly share code, notes, and snippets.

@jwon0615
Created March 22, 2018 02:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwon0615/629b9627aae6ff8d1997e7b95102e082 to your computer and use it in GitHub Desktop.
Save jwon0615/629b9627aae6ff8d1997e7b95102e082 to your computer and use it in GitHub Desktop.
1508 : 나도 IQ 150
#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