'Sw Expert' 태그의 글 목록
본문 바로가기
728x90
반응형

Sw Expert10

2021.11.09_7701-염라대왕의이름정렬 소스코드 #include #include #include using namespace std; int N; bool cmp(string a, string b) { if (a.size() == b.size())return a > lifeName; name.push_back(lifeName); } sort(name.begin(), name.end(), cmp); } int main(int argc, char** argv) { int test_ca.. 2021. 11. 9.
2021.11.06_1217-거듭제곱 소스코드 #include using namespace std; int N, M; long long answer = 0; void initData(); int power(int num, int idx); int main() { int test_case; int T; for (test_case = 1; test_case > T; initData(); answer=power(N, 0); printf("#%d %d\n", test_case, answer); } return 0;//정상종료시 반드시 0을 리턴해야합니다. } void initData() { scanf("%d %d", &N, &M); } int power(int num, int idx) { if (idx == M-1) { return num; } r.. 2021. 11. 8.
2021.11.05_1225암호생성기 소스코드 #include #include #include using namespace std; int password[8]; int startIdx, endIdx; void init(); void searchPassword(); int main(int argc, char** argv) { int test_case; int T; ; /* 여러 개의 테스트 케이스가 주어지므로, 각각을 처리합니다. */ for (test_case = 1; test_case > T; init(); searchPassword(); printf("#%d ", test_case); int idx = startIdx; while(1){ printf("%d ", password[idx++]); idx = idx % 8; if (idx .. 2021. 11. 8.
2021.10.24_1234-비밀번호 소스코드 #include #include #include #include using namespace std; int N;//개수 입력 vectorpassword; void initData();// 초기화 및 초기 입력 void openPassword();//패스워드 풀기 int main(int argc, char** argv) { int test_case; int T; for (test_case = 1; test_case 2021. 10. 24.
728x90
반응형