반응형

백준 9653번 스타워즈 로고 풀이 코드

C | C++ | Java | Python


풀이

공백에 유의하며 제시 모양을 출력합니다.

코드

#include <stdio.h>
int main() {
    printf("    8888888888  888    88888\n");
    printf("   88     88   88 88   88  88\n");
    printf("    8888  88  88   88  88888\n");
    printf("       88 88 888888888 88   88\n");
    printf("88888888  88 88     88 88    888888\n");
    printf("\n");
    printf("88  88  88   888    88888    888888\n");
    printf("88  88  88  88 88   88  88  88\n");
    printf("88 8888 88 88   88  88888    8888\n");
    printf(" 888  888 888888888 88  88      88\n");
    printf("  88  88  88     88 88   88888888\n");
    return 0;
}
#include <iostream>
using namespace std;

int main() {
    cout << "    8888888888  888    88888" << endl;
    cout << "   88     88   88 88   88  88" << endl;	
    cout << "    8888  88  88   88  88888" << endl;
    cout << "       88 88 888888888 88   88" << endl;
    cout << "88888888  88 88     88 88    888888" << endl;
    cout << endl;
    cout << "88  88  88   888    88888    888888" << endl;
    cout << "88  88  88  88 88   88  88  88" << endl;
    cout << "88 8888 88 88   88  88888    8888" << endl;
    cout << " 888  888 888888888 88  88      88" << endl;
    cout << "  88  88  88     88 88   88888888" << endl;
    return 0;
}
public class Main {
    public static void main(String[] args) {
        System.out.println("    8888888888  888    88888\n" +
                "   88     88   88 88   88  88\n" +
                "    8888  88  88   88  88888\n" +
                "       88 88 888888888 88   88\n" +
                "88888888  88 88     88 88    888888\n" +
                "\n" +
                "88  88  88   888    88888    888888\n" +
                "88  88  88  88 88   88  88  88\n" +
                "88 8888 88 88   88  88888    8888\n" +
                " 888  888 888888888 88  88      88\n" +
                "  88  88  88     88 88   88888888");
    }
}
print("    8888888888  888    88888")
print("   88     88   88 88   88  88")
print("    8888  88  88   88  88888")
print("       88 88 888888888 88   88")
print("88888888  88 88     88 88    888888")
print("")
print("88  88  88   888    88888    888888")
print("88  88  88  88 88   88  88  88")
print("88 8888 88 88   88  88888    8888")
print(" 888  888 888888888 88  88      88")
print("  88  88  88     88 88   88888888")

문제 출처

https://www.acmicpc.net/problem/9653

반응형

+ Recent posts