BOJ 10172 개

1 개요[ | ]

BOJ 10172 개
  • 그림을 출력하는 문제
  • 알고리즘 분류: 출력

2 C[ | ]

#include "stdio.h"

int main() {
    printf("|\\_/|\n");
    printf("|q p|   /}\n");
    printf("( 0 )\"\"\"\\\n");
    printf("|\"^\"`    |\n");
    printf("||_/=\\\\__|\n");

    return 0;
}

3 C++[ | ]

#include <iostream>
using namespace std;

int main() {
    cout << "|\\_/|\n";
    cout << "|q p|   /}\n";
    cout << "( 0 )\"\"\"\\\n";
    cout << "|\"^\"`    |\n";
    cout << "||_/=\\\\__|\n";

    return 0;
}

4 C#[ | ]

using System;
class Program {
    static void Main() {
        Console.WriteLine("|\\_/|");
        Console.WriteLine("|q p|   /}");
        Console.WriteLine("( 0 )\"\"\"\\");
        Console.WriteLine("|\"^\"`    |");
        Console.WriteLine("||_/=\\\\__|");
    }
}

5 Go[ | ]

package main
import "fmt"
func main() {
    fmt.Println("|\\_/|");
    fmt.Println("|q p|   /}");
    fmt.Println("( 0 )\"\"\"\\");
    fmt.Println("|\"^\"`|");
    fmt.Println("||_/=\\\\__|");
}

6 Java[ | ]

public class Main {
	public static void main(String[] args) {
		System.out.println("|\\_/|");
		System.out.println("|q p|   /}");
		System.out.println("( 0 )\"\"\"\\");
		System.out.println("|\"^\"`    |");
		System.out.println("||_/=\\\\__|");    
	}
}

7 node.js[ | ]

console.log("|\\_/|");
console.log("|q p|   /}");
console.log("( 0 )\"\"\"\\");
console.log("|\"^\"`    |");
console.log("||_/=\\\\__|");

8 Perl[ | ]

print <<'END'
|\_/|
|q p|   /}
( 0 )"""\
|"^"`    |
||_/=\\__|
END

9 PHP[ | ]

<?php
echo "|\\_/|\n";
echo "|q p|   /}\n";
echo "( 0 )\"\"\"\\\n";
echo "|\"^\"`    |\n";
echo "||_/=\\\\__|\n";
<?php
echo '|\\_/|' . "\n";
echo '|q p|   /}' . "\n";
echo '( 0 )"""\\' . "\n";
echo '|"^"`    |' . "\n";
echo '||_/=\\\\__|' . "\n";
<?php
echo '|\\_/|' . PHP_EOL;
echo '|q p|   /}' . PHP_EOL;
echo '( 0 )"""\\' . PHP_EOL;
echo '|"^"`    |' . PHP_EOL;
echo '||_/=\\\\__|' . PHP_EOL;

10 Python[ | ]

print('|\\_/|')
print('|q p|   /}')
print('( 0 )"""\\')
print('|\"^\"`    |')
print('||_/=\\\\__|')
print("|\\_/|")
print("|q p|   /}")
print("( 0 )\"\"\"\\")
print("|\"^\"`    |")
print("||_/=\\\\__|")

11 R[ | ]

writeLines("|\\_/|")
writeLines("|q p|   /}")
writeLines("( 0 )\"\"\"\\")
writeLines("|\"^\"`    |")
writeLines("||_/=\\\\__|")

12 Ruby[ | ]

puts "|\\_/|"
puts "|q p|   /}"
puts "( 0 )\"\"\"\\"
puts "|\"^\"`    |"
puts "||_/=\\\\__|"
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}