diff --git a/code_study/Baekjoon/c/1676.c b/code_study/Baekjoon/c/1676.c new file mode 100644 index 0000000..92c3f88 --- /dev/null +++ b/code_study/Baekjoon/c/1676.c @@ -0,0 +1,15 @@ +#include + +int main() { + int N; + scanf("%d",&N); + + int res = 0; + for(int i=5; i<=N; i=i*5){ + res += N/i; + } + + printf("%d\n",res); + + return 0; +} \ No newline at end of file diff --git a/code_study/Baekjoon/python/10814.py b/code_study/Baekjoon/python/10814.py new file mode 100644 index 0000000..28063ed --- /dev/null +++ b/code_study/Baekjoon/python/10814.py @@ -0,0 +1,7 @@ +member = [] +for _ in range(int(input())): + _age, _name = input().split() + member.append((int(_age), _name)) + +for m in sorted(member,key = lambda x:x[0]): + print(m[0], m[1]) \ No newline at end of file diff --git a/code_study/Baekjoon/python/1181.py b/code_study/Baekjoon/python/1181.py new file mode 100644 index 0000000..fb02e83 --- /dev/null +++ b/code_study/Baekjoon/python/1181.py @@ -0,0 +1,8 @@ +arr = set() +for _ in range(int(input())) : + arr.add(input()) +arr = sorted(list(arr)) +arr = sorted(arr, key=len) + +for r in arr: + print(r) \ No newline at end of file diff --git a/code_study/Baekjoon/python/7568.py b/code_study/Baekjoon/python/7568.py new file mode 100644 index 0000000..c8a3b92 --- /dev/null +++ b/code_study/Baekjoon/python/7568.py @@ -0,0 +1,12 @@ +arr = [] +for _ in range(int(input())) : + a, b = map(int,input().split()) + arr.append((a,b)) + +for tup in arr : + k=0 + for temp in arr: + if temp[0]>tup[0] and temp[1]>tup[1] : + k += 1 + print(k+1,end=" ") +print() \ No newline at end of file diff --git a/code_study/Baekjoon/ts/11650.ts b/code_study/Baekjoon/ts/11650.ts new file mode 100644 index 0000000..9cfff63 --- /dev/null +++ b/code_study/Baekjoon/ts/11650.ts @@ -0,0 +1,13 @@ +export {}; +const input: string[] = require("fs").readFileSync(0,"utf8").toString().trim().split('\n'); +let arr:[number, number][] = []; +for(let i=1; i<=Number(input[0]); i++){ + let [x, y] = input[i].split(' ').map(Number); + arr.push([x,y]); +} +arr.sort((a,b)=>{ + if(a[0]!==b[0]) return a[0] - b[0]; + else return a[1]-b[1]; +}) + +arr.forEach(v => console.log(v[0],v[1])); \ No newline at end of file diff --git a/code_study/Baekjoon/ts/2751.ts b/code_study/Baekjoon/ts/2751.ts new file mode 100644 index 0000000..564c590 --- /dev/null +++ b/code_study/Baekjoon/ts/2751.ts @@ -0,0 +1,4 @@ +export {}; +const input: string[] = require("fs").readFileSync(0,"utf8").toString().trim().split('\n'); +let arr:number[] = input.slice(1).map(Number).sort((a,b)=>a-b); +console.log(arr.join('\n')); \ No newline at end of file