티스토리 뷰
반응형
https://www.acmicpc.net/problem/1546
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #include <iostream> using namespace std; int main() { int n; cin >> n; int *score = new int[n]; int max = 0; double total = 0; for (int i = 0; i < n; ++i){ cin >> score[i]; if (max < score[i]){ max = score[i]; } total += score[i]; } total = (total / max) * 100; double average = total / n; cout << average << endl; } | cs |
반응형
'코딩 연습 > 백준' 카테고리의 다른 글
[백준 1931] 회의실 배정 (0) | 2019.03.11 |
---|---|
[백준 11047] 동전0 (0) | 2019.03.11 |
댓글
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- ddd
- QuickTimePlayer
- gradle
- cacheable
- linuxkit
- Spring
- docker pull limit
- 클린코드
- kotlin
- 자바
- k8s
- 스프링
- clean code
- 쿠버네티스
- JavaScript
- 자바스크립트
- 스프링부트
- 도메인주도설계
- java
- springboot
- 도커
- Kubernetes
- gasmask
- docker for mac
- kotlin In Action
- ImagePullBackOff
- IntelliJ
- docker
- back merge
- 코틀린
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함