[백준][Python] 3046 - R2
2024. 6. 27. 22:05
백준/Python
https://www.acmicpc.net/problem/3046R1, S = map(int, input().split())R2 = (2*S) - R1print(R2)R1, S = map(int, input().split())map을 이용하여 공백으로 구분된 두 개의 숫자를 정수형으로 변환하고 R1과 S에 각각 대입합니다. R2 = (2*S) - R1print(R2)두 숫자 R1과 R2가 있을 때, 두 수의 평균 S는 (R1+R2)/2 과 같습니다. 그러나 우리는 R2의 값을 모르므로, R2 = 2S − R1 식을 이용해 R2를 구하고 출력합니다.여담문제를 푸는데 자꾸 TypeError가 나는데 어디 부분이 문제인지 감이 오지 않아서 ChatGPT에게 도움을 받았습니다. 1. int(input().sp..
[백준][Python] 10039 - 평균 점수
2024. 6. 26. 21:46
백준/Python
https://www.acmicpc.net/problem/10039 #합계 초기화sum = 0;#5번 반복for index in range(5): score = int(input()) if score for index in range(5): score = int(input())5번 반복하며 원섭, 세희 ,상근, 숭, 강수의 점수 입력 받습니다. if score 문제에서 40점 미만인 학생들은 항상 40점을 받게 된다 라고 조건이 써져있으므로, score가 40점 미만일 경우 40점을 대입합니다.sum에 입력받은 5명의 점수를 합합니다. avg = int(sum / 5)print(avg)총 합계를 5로 나누어 5명의 평균 점수를 구합니다.파이썬은 정수끼리 나눗셈을 할 경우 실수가 ..
[HTML/CSS] Cafe24 클론코딩 1
2024. 6. 24. 00:28
TIL/HTML & CSS
깃허브 주소: https://github.com/Namani31/Day-Training/tree/main/day09목표 레이아웃 설계결과
[TIL/HTML/CSS] 이미지 (img) 가운데 정렬하기
2024. 6. 23. 21:40
TIL/HTML & CSS
결론text-align:center2. display: block; margin-left: auto; margin-right: auto;3. vertical-align:middle" data-ke-type="html">HTML 삽입미리보기할 수 없는 소스문제 해결 흐름HTML & CSS 연습하고 있었는데 헤더에 있는 홈 버튼인 로고(img)가 가운데 정렬 되지 않았다.검색해보니 여러가지가 있는데 난 2번째에 있는 방법을 선택했고 잘 동작한다!참고1. https://jigeumblog.tistory.com/45
[PS][Git] There isn't anything to compare 해결
2024. 1. 5. 11:02
Problem Solving
해결 방법`force push`를 사용할 수 있다면 적용하기1번이 껄끄럽다면 default 브랜치명을 변경하기문제 해결 흐름Udemy Business에서 Master Spring 강의 수강중인데 IDE를 Eclipse 중이다.commit하고 push 했더니 기본 브랜치가 master로 되어있는 바람에 오류가 발생했다.default 브랜치명을 바꿀까 하다가 어차피 혼자 작업중이니 force push로 해결하기로 했다. 프로젝트 우클릭 -> Properties -> Resource의 Location 이 프로젝트가 저장되어 있는 절대 주소 위치니까 git bash에서 checkout 하기 전에 해당 프로젝트 주소로 먼저 들어가자.cd {프로젝트 절대 주소 및 저장된 폴더 주소}git checkout maste..