일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
- C 언어
- 10926
- 꾸준히
- greedy
- 백준
- implement
- 입문
- 친절한 설명
- 문자열
- C
- VS
- Python
- Baekjoon
- C Programming
- 심화1
- 알고리즘
- HTML
- c언어
- Beakjoon
- 코드엔진
- 설명
- 10807
- 문제풀이
- CSS
- 파이썬
- 정리
- 그리디
- 구현
- 초보
- Implemention
- Today
- Total
목록초보 (89)
안경잡이 구루루
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/dI4IIY/btqFoB0EqUH/5i0gAtaFiPSKR7CU4MBkTk/img.png)
나: #include int main() { float score[1000],high=0,total=0; int N; scanf("%d", &N); for (int i = 0; i < N; i++) { scanf("%f", &score[i]); if (high < score[i]) high = score[i]; } for (int j = 0; j < N; j++) { score[j] = score[j] / high * 100.0; total += score[j]; } printf("%f", total /N); return 0; } 완성된 코드는 위와 같다. flaot 형태로 저장하지 않으면 출력할 때 이상한 값(0.0) 이 나와서 이것 때문에 푸느라 오래걸렸다. #include int main() { f..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/QDJXo/btqFnjAedcW/4nkagm630VHv1ugwY63IAk/img.png)
https://www.acmicpc.net/problem/1152 나: sentence = input() word = sentence.split() print(len(word)) 완성된 코드는 위와 같다. sentence라는 변수에 입력값을 받는다. 이때 단어는 빈칸을 기준으로 나눠 지는 것이기 때문에 split()을 이용해서 나눠서 word라는 새로운 변수에 리스트 형태로 각 단어들이 저장된다. 그리고 이 리스트의 길이를 구하고 출력하면 쉽게 문제를 풀 수 있다. 결록은 파이썬 짱짱맨
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/ZuECo/btqFmuWg4kK/KMLIvKqciACDksdegkDRP0/img.png)
https://www.acmicpc.net/problem/2675 나: T = int(input()) for i in range(T): R,S = input().split() s='' for i in range(len(S)): s += S[i]*int(R) print(s) 완성된 코드는 위와 같다. T = int(input()) for i in range(T): R,S = input().split() s='' 테스트 케이스를 결정하는 변수 T에 입력값을 받는다. 그 입력값 만큼 반복문 For을 통해서 반복횟수 R과, 문자열 S를 받는다. 이때 반복으로 새롭게 만들어진 문자열이 들어갈 변수 s 를 문자열을 더할 수 있도록 ''로 초기화 시켰다. for i in range(len(S)): s += S[i]*..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/cS8UDh/btqFcve83Sm/s1j1hn6CdBTMD7PtXh7WkK/img.png)
https://www.acmicpc.net/problem/3052 나: #include int main() { int cnt = 0; int num[10]; for (int i = 0; i < 10; i++) { scanf_s("%d", &num[i]); num[i] = num[i] % 42; } for (int j = 0; j < 10; j++) { for (int k = j + 1; k < 10; k++) { if (num[j] == -1)break; if (num[j] == num[k]) num[k] = -1; } } for (int i = 0; i < 10; i++) { if (num[i] != -1) cnt++; } printf("%d", cnt); } 완성된 코드는 위와 같다. #include..