Programming 썸네일형 리스트형 [C] 백준 10182번 : 개 https://www.acmicpc.net/problem/10172 #include int main() {printf("|\\_/|\n");printf("|q p| /}\n");printf("( 0 )\"\"\"\\\n"); printf("|\"^\"""` |\n"); printf("||_/=\\\\__|\n");} 더보기 [C++] 백준 2442번 : 별 찍기 - 5 https://www.acmicpc.net/problem/2442 #include using namespace std;int main() {int n;cin >> n;for (int i = 1; i 0; j--)cout 더보기 [C++] 백준 1011번 : Fly me to the Alpha Centauri https://www.acmicpc.net/problem/1011 #include using namespace std;int main() {int n;scanf("%d",&n);long long *T_case = new long long[n];long long a, b;for (int i = 0; i < n; i++) {scanf("%d %d", &a, &b);T_case[i] = b - a;}long long cnt = 0;long long max_dis = 0; for (int i = 0; i < n; i++) {while (max_dis < T_case[i]) {cnt++;if (cnt % 2 == 1) max_dis = (cnt-1) * (cnt + 1) / 4 + (cnt + 1) / 2;els.. 더보기 [C++] 백준 1010번 : 다리 놓기 https://www.acmicpc.net/problem/1010 #include using namespace std;int main() {int n;cin >> n;int **T_c = new int*[n];for (int i = 0; i > T_c[i][0] >> T_c[i][1];} long long tmp1 = 1, tmp2 = 1;for (int i = 0; i < n; i++) {if (T_c[i][1] < T_c[i][0] * 2)T_c[i][0] = T_c[i][1] - T_c[i][0];for (int j = 0; j < T_c[i][0]; j++){tmp1 = (j + 1)*tmp1;tmp2 = (T_c[i][1] - j).. 더보기 [C++] 백준 1676번 : 팩토리얼 0의 개수 https://www.acmicpc.net/problem/1676 #include using namespace std;int main() {int n;long result = 1;int tmp,cnt = 0;scanf("%d", &n);for (int i = n; i > 0; i--){tmp = i;while (tmp % 5 == 0) {cnt++;tmp = tmp / 5;}}printf("%d", cnt);} 더보기 [C++] 백준 4344번 : 평균은 넘겠지 https://www.acmicpc.net/problem/4344 #include using namespace std;int main() {int n;cin >> n; int **T_c = new int*[n];int n1;for (int i = 0; i > n1;T_c[i] = new int[n1 + 1];T_c[i][0] = n1;for (int j = 1; j > T_c[i][j];}}int sum, cnt;for (int i = 0; i < n; i++) {sum = 0;cnt = 0;for (int j = 1; j 더보기 [C++] 백준 1110번 : 더하기 사이클 https://www.acmicpc.net/problem/1110 #include using namespace std;int main() {int n;cin >> n;int next = n, cnt = 0;do{cnt++;next = next % 10 * 10 + (next / 10 + next % 10) % 10;} while (n != next);cout 더보기 [C++] 백준 1085번 : 직사각형에서 탈출 https://www.acmicpc.net/problem/1085 #include using namespace std;int main(){ int x,y,w,h; cin >> x >> y >> w >> h; int dis[4]; dis[0] = x; dis[1] = h-y; dis[2] = w-x; dis[3] = y; int result = dis[0]; for(int i=0; i dis[i+1]) result = dis[i+1]; } cout 더보기 이전 1 ··· 26 27 28 29 30 31 32 ··· 38 다음