목록코딩 (418)
Creative Code
https://school.programmers.co.kr/learn/courses/30/lessons/250121 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr #include #include #include #include using namespace std; bool compare1(vectora, vectorb) { // 정렬기준이 "code" return a[0] < b[0]; } bool compare2(vectora, vectorb) { // 정렬기준이 "date" return a[1] < b[1]; } bool compare3(vectora..
#include #include #include #include using namespace std; int dh[4] = {0,1,-1,0}; // 세로로 이동할 방향 int dw[4] = {1,0,0,-1}; // 가로로 이동할 방향 int solution(vector board, int h, int w) { int answer = 0; // 이웃한 칸이 같은색깔인경우의 수 int n = board.size(); for (int i = 0; i = n || w_check = n) continue; ..
https://school.programmers.co.kr/learn/courses/30/lessons/250137 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr #include #include #include #include #include using namespace std; int solution(vector bandage, int health, vector attacks) { int answer = 0; int success = 0; // 연속 성공시간 int status_health = health; // 현재체력 int timeend = att..

잠시 Lunar의 개발이 중단됩니다..! 왼쪽 Friend list에서 서로 팔로우가 되어있는 유저들 목록 출력이 되고 각 유저의 아이디를 클릭하면 대화내역 불러오는 기능, 오른쪽 사이드바에는 오픈채팅을 생성하고 (인원 제한 설정가능), 오픈채팅 버튼을 누르면 역시 대화내용들을 불러올 수 있다. participating rooms 에는 현재 참여중인 채팅방의 목록이 표시된다. ※pages/chat.py 코드 # lunar.state.home 모듈에서 필요한 State 및 HomeState를 가져옵니다. import reflex as rx from lunar.state.base import State from lunar.state.home import HomeState # 컴포넌트를 가져옵니다. from ..
https://www.acmicpc.net/problem/2312 2312번: 수 복원하기 첫째 줄에 테스트 케이스의 수가 주어진다. 각 테스트 케이스마다 양의 정수 N (2 ≤ N ≤ 100,000)이 주어진다. www.acmicpc.net #include #include #include #include using namespace std; void solution(int k) { int a = 2; // 처음 나눌 소인수 int b = 0; // a로 나누어떨어지는 횟수 while (k > 1) { if (k % a == 0) { // k가 a로 나누어떨어질때 b++; // 횟수 추가 k /= a; if (k % a != 0) { printf("%d %d\n",a, b); // 더이상 나누어떨어지지 ..

2월 3일 다음 업데이트 예정! sql 문에 오류가 계속 생겨서 해결하는데 어려웠지만 어쨌든 날짜별로 대화내용을 조회하고 삭제할 수 있는 기능도 추가하는데 성공했다.. sql좀 다시 봐야겠다.. 내일부터는 message기능..! ※pages/aichat.py 전체 코드 # lunar.state.home 모듈에서 필요한 State 및 HomeState를 가져옵니다. import reflex as rx from lunar.state.base import State from lunar.state.home import HomeState # 컴포넌트를 가져옵니다. from ..components import container color = "rgb(107,99,246)" # 탭 버튼을 생성하는 함수 def tab..