#2292번 벌집 (c++) int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int num = 0; // 방의 숫자 int ans = 1; //누적되는 6의 배수 int i = 1; // 거쳐가는 방의 방문 수 cin >> num; while(ans 🖥️ CS/Baekjoon Algorithms 2020.02.12
#2839번 설탕 배달 (c++) #include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int w = 0; int a,b,i=0; cin >> w; while(a>=0) { a=(w/5)-i; if(a 🖥️ CS/Baekjoon Algorithms 2020.02.12
#1712번 손익분기점 (c++) #include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int a,b,c = 0; // a= 고정 비용 , b = 노트북 한 대 생산가격, c = 노트북 가격 cin >> a >> b >> c; if(b>=c) { cout a >> b >> c; int manu = a+b; if(b>=c) { cout =0) { manu+=(b-c); i++; } cout 🖥️ CS/Baekjoon Algorithms 2020.02.12
#1316번 그룹단어체커 (c++) #include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); int test = 0; int ans = 0 ; bool check1 = false; bool check2 = false; cin >> test; for(int i=0; i> s; if(s.size() 🖥️ CS/Baekjoon Algorithms 2020.02.11
#1065번 한수 (c++) #include using namespace std; bool check(int a) { if(((a/100)-(a/10)%10)==((a/10)%10-a%10)) return true; else return false; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int ans = 0; int get = 0; cin >> get; bool num[1001]; // 0~1000개 for(int i=0; i 🖥️ CS/Baekjoon Algorithms 2020.02.08
#4673번 셀프넘버 (c++) #include using namespace std; int check(int a) { return a+(a/1000)+(a/100)%10+(a/10)%10+a%10; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); bool list[10000]; // 0 ~ 9999 for(int i=0; i 🖥️ CS/Baekjoon Algorithms 2020.02.08
#1008번 A/B (c++) #include using namespace std; int main(void){ double a,b; cin>> a; cin>> b; cout.precision(10); cout 🖥️ CS/Baekjoon Algorithms 2020.01.14
#4604번 Steganography (c++) #include #include #include #include using namespace std; /* 1. 문자열을 받는다. 이 문자열은 엔터키 또한 받아내야 한다. 2. 스페이스바(공백)를 기준으로 덱에 넣는다. 공백이 홀수개면 0, 짝수개면 1을 넣는다. 3. 해당 덱은 5개씩 끊어내며, 만약 마지막 5의 배수로 받아내지 못할경우 5의 배수로 끝나도록 맨 마지막에 0을 넣는다. 4 해당 덱을 이진수로 변환하여 테이블표대로 출력한다. */ int main(void){ deque dq; while(1) { string temp; getline (cin, temp); if(temp.size()==1&&temp=="#") break; // 아예 종료한다. else if (temp.size()==1&&t.. 🖥️ CS/Baekjoon Algorithms 2020.01.13