[백준 10170] NFC West vs North (C#, C++) - soo:bak
작성일 :
문제 링크
설명
NFC West와 NFC North 디비전의 순위표를 출력하는 문제입니다.
입력은 없으며, 문제에서 주어진 표를 그대로 출력합니다.
접근법
주어진 표를 그대로 출력합니다.
Code
C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using System;
namespace Solution {
class Program {
static void Main(string[] args) {
Console.WriteLine("NFC West W L T");
Console.WriteLine("-----------------------");
Console.WriteLine("Seattle 13 3 0");
Console.WriteLine("San Francisco 12 4 0");
Console.WriteLine("Arizona 10 6 0");
Console.WriteLine("St. Louis 7 9 0");
Console.WriteLine();
Console.WriteLine("NFC North W L T");
Console.WriteLine("-----------------------");
Console.WriteLine("Green Bay 8 7 1");
Console.WriteLine("Chicago 8 8 0");
Console.WriteLine("Detroit 7 9 0");
Console.WriteLine("Minnesota 5 10 1");
}
}
}
C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout << "NFC West W L T\n";
cout << "-----------------------\n";
cout << "Seattle 13 3 0\n";
cout << "San Francisco 12 4 0\n";
cout << "Arizona 10 6 0\n";
cout << "St. Louis 7 9 0\n\n";
cout << "NFC North W L T\n";
cout << "-----------------------\n";
cout << "Green Bay 8 7 1\n";
cout << "Chicago 8 8 0\n";
cout << "Detroit 7 9 0\n";
cout << "Minnesota 5 10 1\n";
return 0;
}