20250621 baekjoon
This commit is contained in:
parent
459ddaa2a8
commit
76a60e502f
17
code_study/Baekjoon/c/10250.c
Normal file
17
code_study/Baekjoon/c/10250.c
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
int T;
|
||||||
|
scanf("%d",&T);
|
||||||
|
while(T--) {
|
||||||
|
int H, W, N, floor, number, isMulti;
|
||||||
|
scanf("%d %d %d",&H, &W, &N);
|
||||||
|
isMulti = N%H;
|
||||||
|
floor = isMulti ? N%H : H;
|
||||||
|
number = isMulti ? N/H + 1 : N/H;
|
||||||
|
if(number<10) printf("%d0%d\n",floor,number);
|
||||||
|
else printf("%d%d\n",floor,number);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
12
code_study/Baekjoon/c/2475.c
Normal file
12
code_study/Baekjoon/c/2475.c
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
int n, sum=0;
|
||||||
|
for(int i=0; i<5; i++) {
|
||||||
|
scanf("%d",&n);
|
||||||
|
sum +=n*n;
|
||||||
|
}
|
||||||
|
printf("%d\n",sum%10);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
10
code_study/Baekjoon/c/2741.c
Normal file
10
code_study/Baekjoon/c/2741.c
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
int N;
|
||||||
|
scanf("%d",&N);
|
||||||
|
for(int n=1; n<=N; n++) {
|
||||||
|
printf("%d\n",n);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
16
code_study/Baekjoon/c/31403.c
Normal file
16
code_study/Baekjoon/c/31403.c
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
int A,B,C;
|
||||||
|
scanf("%d %d %d",&A, &B, &C);
|
||||||
|
int a=A, b=B;
|
||||||
|
while(b!=0) {
|
||||||
|
b /= 10;
|
||||||
|
a *= 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("%d\n%d\n",A+B-C, a+B-C);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
}
|
||||||
7
code_study/Baekjoon/js/10250.js
Normal file
7
code_study/Baekjoon/js/10250.js
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
const n = require("fs").readFileSync(0,"utf8").toString().trim().split('\n');
|
||||||
|
for(let i=1; i<=Number(n[0]); i++) {
|
||||||
|
let [H, W, N] = n[i].split(' ').map(Number);
|
||||||
|
const floor = N%H==0 ? H : N%H;
|
||||||
|
const number = N%H==0 ? Math.floor(N/H) : Math.floor(N/H) + 1;
|
||||||
|
console.log(`${floor}${number<10 ? '0' : ''}${number}`);
|
||||||
|
}
|
||||||
3
code_study/Baekjoon/js/2475.js
Normal file
3
code_study/Baekjoon/js/2475.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
const n = require("fs").readFileSync(0, "utf8").toString().trim().split(' ').map(Number);
|
||||||
|
const res = n.reduce((acc,v) => acc + v**2,0)%10;
|
||||||
|
console.log(res);
|
||||||
4
code_study/Baekjoon/js/2741.js
Normal file
4
code_study/Baekjoon/js/2741.js
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
const N = Number(require("fs").readFileSync(0,"utf8").toString().trim());
|
||||||
|
for(let n=1; n<=N; n++) {
|
||||||
|
console.log(n);
|
||||||
|
}
|
||||||
3
code_study/Baekjoon/js/31403.js
Normal file
3
code_study/Baekjoon/js/31403.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
const n = require("fs").readFileSync(0, "utf8").toString().trim().split('\n');
|
||||||
|
console.log(Number(n[0])+Number(n[1])-Number(n[2]));
|
||||||
|
console.log(n[0]+n[1] - n[2]);
|
||||||
5
code_study/Baekjoon/python/10250.py
Normal file
5
code_study/Baekjoon/python/10250.py
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
for _ in range(int(input())) :
|
||||||
|
h, w, n = map(int, input().split())
|
||||||
|
floor = h if n%h==0 else n%h
|
||||||
|
number = n//h if n%h==0 else n//h+1
|
||||||
|
print(f"{floor}{'0' if number<10 else ''}{number}")
|
||||||
2
code_study/Baekjoon/python/2475.py
Normal file
2
code_study/Baekjoon/python/2475.py
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
arr = map(int, input().split())
|
||||||
|
print(sum(v*v for v in arr)%10)
|
||||||
2
code_study/Baekjoon/python/2741.py
Normal file
2
code_study/Baekjoon/python/2741.py
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
for n in range(1, int(input())+1) :
|
||||||
|
print(n)
|
||||||
3
code_study/Baekjoon/python/31403.py
Normal file
3
code_study/Baekjoon/python/31403.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
a,b,c = input(), input(), input()
|
||||||
|
print(int(a)+int(b)-int(c))
|
||||||
|
print(int(a+b)-int(c))
|
||||||
Loading…
x
Reference in New Issue
Block a user