작성일 :

문제 링크

21598번 - SciComLove

설명

정수 N(1 ≤ N ≤ 2)이 주어지면 문자열 SciComLoveN번 줄바꿈하며 출력합니다.


접근법

반복문으로 NSciComLove를 출력하면 됩니다. 추가 조건은 없습니다.



Code

C#

1
2
3
4
5
6
7
8
9
10
11
using System;

namespace Solution {
  class Program {
    static void Main(string[] args) {
      int n = int.Parse(Console.ReadLine()!);
      for (int i = 0; i < n; i++)
        Console.WriteLine("SciComLove");
    }
  }
}

C++

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

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

  int n; cin >> n;
  while (n--)
    cout << "SciComLove\n";
  
  return 0;
}