본문 바로가기

judge

Codeforces Problem 495A : Digital Counter Codeforces Problem 495A : Digital Counter http://codeforces.com/contest/495/problem/A #include using namespace std; int main() { const int table[] = { 2, 7, 2, 3, 3, 4, 2, 5, 1, 2 }; int in_floor; scanf("%d", &in_floor); printf("%d\n", table[in_floor / 10] * table[in_floor % 10]); return 0; } 더보기
ACMICPC 1157 : 단어 공부 ACMICPC 1157 : 단어 공부 https://www.acmicpc.net/problem/1157 #include #include using namespace std; int main() { bool flag = false; int max = -1, max_index = -1; int count_char[26] = { 0, }; string in_str; cin >> in_str; for (int i = 0; i < (int)in_str.size(); ++i) { count_char[toupper(in_str[i])-'A']++; } for (int i = 0; i < 26; ++i) { if (max == count_char[i]) flag = true; else if (max < count_ch.. 더보기
ACMICPC 1920 : 수 찾기 ACMICPC 1920 : 수 찾기 https://www.acmicpc.net/problem/1920 #include #include #include using namespace std; int main() { vector vec_array; int num_array, num_finds; cin >> num_array; for (int i = 0; i < num_array; ++i) { int in_temp = 0; cin >> in_temp; vec_array.push_back(in_temp); } sort(vec_array.begin(), vec_array.end()); cin >> num_finds; for (int i = 0; i < num_finds; ++i) { int in_value; cin.. 더보기
Algospot : ENCRYPT Algospot : ENCRYPT https://algospot.com/judge/problem/read/ENCRYPT #include #include using namespace std; int main(void) { int num_cases = 0; cin >> num_cases; for (int n = 0; n < num_cases; ++n) { string str; cin >> str; string left_str, right_str; for (int i = 0; i < str.size(); ++i) { if (i % 2 == 0) left_str += str.at(i); else right_str += str.at(i); } cout 더보기
ACMICPC 1003 : 피보나치 함수 ACMICPC 1003 : 피보나치 함수 https://www.acmicpc.net/problem/1003 #include using namespace std; int main() { int num_cases = 0; cin >> num_cases; for (int i = 0; i < num_cases; ++i) { int n = 0; cin >> n; if (n == 0)cout 더보기