문제 링크: https://www.acmicpc.net/problem/10926
백준 입출력과 사칙연산 7단계 - 10926번 ??!를 풀어보았다.
풀이: 알파벳 소문자로만 구성되어 있는 문자열을 입력받고, ??!를 붙여 출력한다.
C++
#include <iostream>
using namespace std;
int main() {
string str;
cin >> str;
cout<<str<<"??!";
}
Python
id=input()
print(id,end="??!")
Java
import java.util.Scanner;
class Main
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
String s=sc.nextLine();
System.out.println(s+"??!");
}
}
'코테용 문제풀이 > 백준' 카테고리의 다른 글
킹, 퀸, 룩, 비숍, 나이트, 폰 풀이 (0) | 2022.12.30 |
---|---|
1998년생인 내가 태국에서는 2541년생?! 풀이 (0) | 2022.12.30 |
사칙연산 풀이 (0) | 2022.12.30 |
A/B 풀이 (0) | 2022.12.30 |
A×B 풀이 (0) | 2022.12.30 |