# ๐ฅBaekjoon start๐ฅ

arielยท2021๋ 11์ 8์ผ
0

๋ชฉ๋ก ๋ณด๊ธฐ
6/14

# 2021-11-08

โ์ช ์ ํจ๊ป ํ๋ฃจ์ 30๋ถ ์ด์ ์์โจ

#### 4344

import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int[] arr;

int testcase = sc.nextInt();

for(int i=0; i<testcase; i++){
int N = sc.nextInt(); //ํ์ ์
arr = new int[N];

double sum = 0; //์ฑ์  ๋์  ํฉ ๋ณ์

//์ฑ์  ์๋ ฅ๋ถ๋ถ
for(int j = 0; j<N; j++) {
int val = sc.nextInt(); //์ฑ์  ์๋ ฅ
arr[j] = val;
sum += val; //์ฑ์  ๋์  ํฉ
}
double mean = (sum / N);
double count = 0; //ํ๊ท  ๋๋ ํ์ ์ ๋ณ์

//ํ๊ท  ๋๋ ํ์ ๋น์จ ์ฐพ๊ธฐ
for(int j = 0; j<N; j++) {
if(arr[j]>mean) {
count++;
}
}
System.out.printf("%.3f%%\n",(count/N)*100);
}
}

}

#### 11654

import java.util.Scanner;

public class Main {
public static void main(String[] args) {

Scanner in = new Scanner(System.in);

int ch = in.next().charAt(0);

System.out.print(ch);
}
}

#### 11720

import java.util.Scanner;

public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);

int N = sc.nextInt(); //์ซ์์ ๊ฐ์
String a = sc.next(); //๊ณต๋ฐฑ์๋ ์ซ์์ด๊ธฐ์ ๋ฌธ์๋ก ์ซ์๋ฅผ ์๋ ฅ๋ฐ์
sc.close();
int sum = 0;

for(int i=0; i<N; i++) {
sum += a.charAt(i)-'0'; //"a.charAt(i)-'0'"์์คํค๋ฌธ์๋ก ๋ณํํ์ง ์๊ธฐ ์ํด
}
System.out.println(sum);

}
}