![[백준 / BOJ] 25083번 새싹 (C++, Python)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fbd2zwg%2FbtrLhubOpnG%2FekzyQDHnN9r8DPgKkHkUw0%2Fimg.jpg)
[백준 / BOJ] 25083번 새싹 (C++, Python)◎ 자료구조와 알고리즘/백준(BOJ) 문제풀이2022. 9. 4. 18:44
반응형
링크 : https://www.acmicpc.net/problem/25083
25083번: 새싹
아래 예제와 같이 새싹을 출력하시오.
www.acmicpc.net
문제

문제 풀이
10171 고양이 문제와 같이 이스케이프 시퀀스를 알아야 하는 문제다. 개념을 알기만 하면 쉽게 풀린다.
코드 전문
C++
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
void init() { | |
std::ios_base::sync_with_stdio(false); | |
std::cin.tie(nullptr); | |
std::cout.tie(nullptr); | |
} | |
int main() { | |
init(); | |
std::cout << " ,r'\"7" << "\n"; | |
std::cout << "r`-_ ,' ,/" << "\n"; | |
std::cout << " \\. \". L_r'" << "\n"; | |
std::cout << " `~\\\/" << "\n"; | |
std::cout << " |" << "\n"; | |
std::cout << " |" << "\n"; | |
return 0; | |
} |
Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
input = sys.stdin.readline | |
if __name__ == "__main__": | |
print(" ,r'\"7") | |
print("r`-_ ,' ,/") | |
print(" \\. \". L_r'") | |
print(" `~\\/") | |
print(" |") | |
print(" |") |
소감
반응형
'◎ 자료구조와 알고리즘 > 백준(BOJ) 문제풀이' 카테고리의 다른 글
[백준 / BOJ] 2525번 오븐 시계 (C++, Python) (0) | 2022.09.13 |
---|---|
[백준 / BOJ] 1330번 두 수 비교하기 (C++, Python) (부제 : 삼항 연산자) (0) | 2022.09.05 |
[백준 / BOJ] 10172번 개 (C++, Python) (0) | 2022.09.04 |
[백준 / BOJ] 10171번 고양이 (C++, Python) (부제 : 이스케이프 시퀀스) (0) | 2022.09.04 |
[백준 / BOJ] 2588번 곱셈 (C++, Python) (0) | 2022.09.04 |
@Reo :: 코드 아카이브
자기계발 블로그