From 2b46e3d9a656ce9e6ab6ca7e99d086465d999593 Mon Sep 17 00:00:00 2001 From: songyc macbook Date: Thu, 2 Oct 2025 19:49:41 +0900 Subject: [PATCH] 20251002 baekjoon --- code_study/Baekjoon/c/10830.c | 98 +++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 code_study/Baekjoon/c/10830.c diff --git a/code_study/Baekjoon/c/10830.c b/code_study/Baekjoon/c/10830.c new file mode 100644 index 0000000..f92abae --- /dev/null +++ b/code_study/Baekjoon/c/10830.c @@ -0,0 +1,98 @@ +#include +#include +#include + +int** allocation(int N, bool input); +void free_memory(int** arr, int N); +void printArr(int** arr, int N); +int** multyply(int** A, int** B, int N); +int** product(int** arr, int N, long long B); + +int main() { + int N; + long long B; + scanf("%d %lld", &N, &B); + int** arr = allocation(N, true); + int** result = product(arr, N, B); + + printArr(result, N); + + free_memory(arr, N); + free_memory(result, N); + + return 0; +} + +int** allocation(int N, bool input) { + int** arr = (int**)malloc(sizeof(int*)*N); + + for(int i=0; i