[백준 21598] SciComLove (C#, C++) - soo:bak
작성일 :
문제 링크
설명
정수 N(1 ≤ N ≤ 2)이 주어지면 문자열 SciComLove를 N번 줄바꿈하며 출력합니다.
접근법
반복문으로 N번 SciComLove를 출력하면 됩니다. 추가 조건은 없습니다.
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;
}