알고리즘

[BAEKJOON] 1809 Moo

mAlfred 2023. 12. 1. 10:45
반응형

문제

You’ve decided to buy a farm and start a new life. To pass some time while you wait for the title of the land to go through, produce the following ascii cow.

예제 입력 1 복사

예제 출력 1 복사

(___)
(o o)____/
 @@      \
  \ ____,/
  //   //
 ^^   ^^

 


이 문제 같은 경우는 언어 제한이 있었는데

난생 처음보는 언어였다.

 

GolfScript???

 

GolfScript

 

GolfScript

GolfScript GolfScript is a stack oriented esoteric programming language aimed at solving problems (holes) in as few keystrokes as possible. It also aims to be simple and easy to write.Short code is achieved by using single symbols to represent high level o

www.golfscript.com

 

근데 사실 상 출력하는 것은 그냥 문자열로 담아주기만 해도 되서 쉽게 풀었다.

 

 
"(___)\n" + "(o o)____/\n" + " @@      \\\n" + "  \\ ____,/\n" + "  //   //\n" + " ^^   ^^\n"
 

 

import sys
a = "(___)\n" + "(o o)____/\n" + " @@      \\\n" + "  \\ ____,/\n" + "  //   //\n" + " ^^   ^^\n"

sys.stdout.write(a)

 

파이썬 코드는 이러했다..

반응형