작성일 :

문제 링크

30328번 - Java Warriors

설명

팀 수 n이 주어질 때, 팀당 등록비 4000달러를 곱해 총액을 출력하는 문제입니다.


접근법

n에 4000을 곱한 값을 출력합니다.


Code

C#

1
2
3
4
5
6
7
8
using System;

class Program {
  static void Main() {
    var n = int.Parse(Console.ReadLine()!);
    Console.WriteLine(n * 4000);
  }
}

C++

1
2
3
4
5
6
7
8
9
10
11
12
#include <bits/stdc++.h>
using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);

  int n; cin >> n;
  cout << n * 4000 << "\n";

  return 0;
}

Tags: 30328, arithmetic, BOJ, C#, C++, Java, 백준, 수학, 알고리즘

Categories: ,