반응형

백준 10170번 NFC West vs North 풀이 코드

C | C++ | Java | Python


풀이

정해진 글을 그대로 출력합니다.

코드

#include <stdio.h>

int main() {
    printf("NFC West       W   L  T\n");
    printf("-----------------------\n");
    printf("Seattle        13  3  0\n");
    printf("San Francisco  12  4  0\n");
    printf("Arizona        10  6  0\n");
    printf("St. Louis      7   9  0\n\n");
    printf("NFC North      W   L  T\n");
    printf("-----------------------\n");
    printf("Green Bay      8   7  1\n");
    printf("Chicago        8   8  0\n");
    printf("Detroit        7   9  0\n");
    printf("Minnesota      5  10  1\n");
    return 0;
}
#include <iostream>
using namespace std;

int main () {
    cout << "NFC West       W   L  T" << endl
    << "-----------------------" << endl
    << "Seattle        13  3  0" << endl
    << "San Francisco  12  4  0" << endl
    << "Arizona        10  6  0" << endl
    << "St. Louis      7   9  0" << endl << endl
    << "NFC North      W   L  T" << endl
    << "-----------------------" << endl
    << "Green Bay      8   7  1" << endl
    << "Chicago        8   8  0" << endl
    << "Detroit        7   9  0" << endl
    << "Minnesota      5  10  1";
    return 0;
}
public class Main {
    public static void main(String[] args) {
        System.out.println("NFC West       W   L  T\n" +
              "-----------------------\n" +
              "Seattle        13  3  0\n" +
              "San Francisco  12  4  0\n" +
              "Arizona        10  6  0\n" +
              "St. Louis      7   9  0\n" +
              "\n" +
              "NFC North      W   L  T\n" +
              "-----------------------\n" +
              "Green Bay      8   7  1\n" +
              "Chicago        8   8  0\n" +
              "Detroit        7   9  0\n" +
              "Minnesota      5  10  1");
    }
}
print("NFC West       W   L  T")
print("-----------------------")
print("Seattle        13  3  0")
print("San Francisco  12  4  0")
print("Arizona        10  6  0")
print("St. Louis      7   9  0")
print("")
print("NFC North      W   L  T")
print("-----------------------")
print("Green Bay      8   7  1")
print("Chicago        8   8  0")
print("Detroit        7   9  0")
print("Minnesota      5  10  1")

문제 출처

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

반응형

+ Recent posts