Notice
Recent Posts
Recent Comments
Link
알고리즘 모음(C++)
백준 25314 - 코딩은 체육과목 입니다.(C++) 본문
문제 링크입니다. https://www.acmicpc.net/problem/25314
주어진 수를 4로 나눈 값만큼 long 을 출력하면 되는 문제였습니다.
자세한 것은 코드를 참고해주세요.
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <cstring>
#include <cmath>
#include <map>
#include <vector>
using namespace std;
int x;
int main(){
cin.tie(0);
cout.tie(0);
cin >> x;
for(int i = 0; i < x/4; i++){
cout << "long" << " ";
}
cout << "int";
return 0;
}
질문 및 조언은 댓글을 남겨주세요.
'백준' 카테고리의 다른 글
백준 15988 - 1, 2, 3 더하기 3(C++) (0) | 2023.07.14 |
---|---|
백준 11478 - 서로 다른 부분 문자열의 개수(C++) (0) | 2023.07.14 |
백준 2745 - 진법 변환(C++) (0) | 2023.07.02 |
백준 1439 - 뒤집기(C++) (0) | 2023.07.02 |
백준 1373 - 2진수 8진수(C++) (0) | 2023.07.02 |