1 2 3 4 5 6 7 | #include <stdio.h> int main(){ int n; scanf("%d", &n); if (printf("%d\n", n)&& n) while (n&&printf("%d\n", n += (n&(1 << 31) ? 1 : -1))); return 0;} | cs |
행운의 7줄로 줄임
1 2 3 4 5 6 7 | #include <stdio.h> int main(){ int n; scanf("%d", &n); if (printf("%d\n", n)&& n) while (n&&printf("%d\n", n += (n&(1 << 31) ? 1 : -1))); return 0;} | cs |
행운의 7줄로 줄임
와 ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ 이런식으로도 표현할 수 있네요 ㅋㅋㅋ 되게 참신하네요 수학문제 푸는거같아요 이런방법 저런방법.. 감사합니다 좋은 공부 됐어요~