πŸ–€ Algorithm/CodeUp : Cμ–Έμ–΄ 기초 100제

[μ½”λ“œμ—… CodeUp] Cμ–Έμ–΄ 기초 100제 1001번 ~ 1008번 풀이

μ˜ˆμ§„-D 2021. 3. 19. 20:35

codeup.kr/problemsetsol.php

 

λ¬Έμ œμ§‘

 

codeup.kr

μ•Œκ³ λ¦¬μ¦˜ 곡뢀λ₯Ό μ‹œμž‘ν•˜κΈ° μ•žμ„œ μ½”λ“œμ—…(CodeUp)의 기초 100제λ₯Ό ν’€μ΄ν•˜κΈ°λ‘œ ν•©λ‹ˆλ‹€.

μ €λŠ” C언어와 Python 쀑 쑰금 더 μΉœμˆ™ν•œ Cμ–Έμ–΄λ₯Ό μ„ νƒν–ˆμŠ΅λ‹ˆλ‹€.

1001λ²ˆλΆ€ν„° 1008λ²ˆκΉŒμ§€λŠ” 기초 좜λ ₯ μ˜ˆμ œμž…λ‹ˆλ‹€. 😊

 

 

μ•„λž˜ μ½”λ“œλ“€μ€ 제 κΉƒν—ˆλΈŒμ—μ„œλ„ ν™•μΈν•˜μ‹€ 수 μžˆμŠ΅λ‹ˆλ‹€. :-)

https://github.com/YejinHwang-D/Algorithm_CodeUp 

 

GitHub - YejinHwang-D/Algorithm_CodeUp: Code-up basic 100 answer using C

Code-up basic 100 answer using C. Contribute to YejinHwang-D/Algorithm_CodeUp development by creating an account on GitHub.

github.com

 


 

 

 

 

πŸ’‘ μ•„μ£Ό μ†Œμ†Œν•œ Tip

λ°˜λ³΅λ˜λŠ” μ½”λ“œ ν‘œν˜„μ€ μ½”λ”© μŠ€νƒ€μΌ 섀정을 μ΄μš©ν•˜λ©΄ μžλ™μœΌλ‘œ μž…λ ₯ν•΄μ€λ‹ˆλ‹€. 

 

main ν•¨μˆ˜μ™€ 초반 μž…μΆœλ ₯ μ˜ˆμ œμ—μ„œ ν•„μˆ˜μ μœΌλ‘œ μ‚¬μš©λ  printf(""); κΉŒμ§€λ„ μ μ–΄λ‘μ‹œλ©΄ νŽΈν•©λ‹ˆλ‹€. 

 

 

 


 

 

# 1001번

좜λ ₯ μ˜ˆμ‹œ: Hello

주의 사항:

#include <stdio.h>

int main()
{
printf("Hello");
return 0;
}

 

 

# 1002번

좜λ ₯ μ˜ˆμ‹œ: Hello World

주의 사항: λŒ€μ†Œλ¬Έμž

#include <stdio.h>

int main() {
    printf("Hello World");
    return 0;
}

 

 

# 1003번

좜λ ₯ μ˜ˆμ‹œ: Hello

                      World

주의 사항: μ€„λ°”κΏˆ

#include <stdio.h>

int main() {
    printf("Hello\nWorld");
    return 0;
}

 

 

# 1004번

좜λ ₯ μ˜ˆμ‹œ: 'Hello'

주의 사항: 특수 문자 '

#include <stdio.h>

int main() {
    printf("\'Hello\'");
    return 0;
}

 

 

# 1005번

좜λ ₯ μ˜ˆμ‹œ: "Hello World"

주의 사항: 특수 문자 "

#include <stdio.h>

int main() {
    printf("\"Hello World\"");
    return 0;
}

 

 

# 1006번

좜λ ₯ μ˜ˆμ‹œ: "!@#$%^&*()"

주의 사항: 특수 문자 %

#include <stdio.h>

int main() {
    printf("\"\!\@\#\$%%\^\&\*\(\)\"");
    return 0;
}

 

 

# 1007번

좜λ ₯ μ˜ˆμ‹œ: "C:\Download\hello.cpp"

주의 사항: 특수 문자 \(backslash)

#include <stdio.h>

int main() {
    printf("\"C:\\Download\\hello.cpp\"");
    return 0;
}

 

 

# 1008번

좜λ ₯ μ˜ˆμ‹œ: β”Œβ”¬β”
                      β”œβ”Όβ”€
                      β””β”΄β”˜

주의 사항: μœ λ‹ˆμ½”λ“œ \u

#include <stdio.h>

int main() {
    printf("\u250C\u252C\u2510\n");
    printf("\u251C\u253C\u2524\n");
    printf("\u2514\u2534\u2518");
    return 0;
}
#include <stdio.h>

int main() {
    printf("\u250C\u252C\u2510\n\u251C\u253C\u2524\n\u2514\u2534\u2518");
    return 0;
}

ν•œμ€„μ— 이어 μ“°λ‚˜ μ„Έμ€„λ‘œ λ‚˜λˆ μ„œ μ“°λ‚˜ 좜λ ₯ κ²°κ³ΌλŠ” κ°™μŠ΅λ‹ˆλ‹€.