Skip to content

Instantly share code, notes, and snippets.

View glowing713's full-sized avatar
🔥

Sunhwan Lee glowing713

🔥
  • South Korea
  • 23:31 (UTC +09:00)
View GitHub Profile
🌞 Morning 7 commits ▌░░░░░░░░░░░░░░░░░░░░ 2.4%
🌆 Daytime 93 commits ██████▊░░░░░░░░░░░░░░ 32.5%
🌃 Evening 119 commits ████████▋░░░░░░░░░░░░ 41.6%
🌙 Night 67 commits ████▉░░░░░░░░░░░░░░░░ 23.4%
@glowing713
glowing713 / FESTIVAL.cpp
Last active August 20, 2019 07:56
종만북 FESTIVAL
#define MAX 1000
#include <iostream>
using namespace std;
void func(){
int cost[MAX] = {0,}, sum[MAX] = {0,}; // 대여 비용 저장 배열, 부분합 저장 배열
int avail = 0, checked = 0; // 테스트 케이스 수, 대여 가능한 날 수, 이미 섭외한 공연팀 수
double temp = 0, avg = 0;
cin >> avail >> checked; // 대여 가능한 날 수, 이미 섭외한 공연팀 수 read
@glowing713
glowing713 / 10872.cpp
Created July 29, 2019 09:57
백준 10872번 팩토리얼
#include <iostream>
using namespace std;
int main(void){
int input = 0, result = 1;
cin >> input;
for(int i = 1; i <= input; i++){
result *= i;
}
cout << result << endl;
@glowing713
glowing713 / 1065_2.cpp
Created July 25, 2019 17:36
백준 1065번 한수(simplecode)
#include <iostream>
using namespace std;
int main(void){
int N = 0, count = 0, a = 0, b = 0, c = 0;
cin >> N;
if(N < 100){
cout << N << endl;
return 0;
@glowing713
glowing713 / 1065_1.cpp
Last active July 25, 2019 17:35
백준 1065번 한수(함수 활용)
#include <iostream>
using namespace std;
bool check(int num); // 입력된 숫자가 한수인지 여부 확인
int main(void){
int N = 0, count = 0;
cin >> N;
for(int i = 1; i <= N; ++i){
@glowing713
glowing713 / 4673.cpp
Last active July 24, 2019 16:18
백준 4673번 셀프 넘버
#define MAX 10001
#include <iostream>
using namespace std;
int d(int n); // n과 n의 각 자리수 더하는 함수
int main(void){
int arr[MAX] = {0,}; // 크기가 10001인 배열을 0으로 초기화
/***************** 모든 생성자를 1로 설정 *****************/
@glowing713
glowing713 / 15596.cpp
Created July 24, 2019 15:23
백준 15596번 정수 N개의 합
#include <vector>
using namespace std;
long long sum(vector<int> &a) {
long long ans = 0;
for(vector<int>::iterator itr = a.begin(); itr != a.end(); itr++){
ans += *itr;
}
return ans;
}
@glowing713
glowing713 / 4344.cpp
Created July 18, 2019 12:37
백준 4344번 평균은 넘겠지
#include <iostream>
using namespace std;
int main(void){
int arr[1000] = {0,};
int cycle = 0, snum = 0, sum = 0, avg = 0;
cin >> cycle;
for(int i = 0; i < cycle; ++i){
cin >> snum;
@glowing713
glowing713 / 8958.cpp
Created July 18, 2019 12:02
백준 8958번 OX퀴즈
#include <iostream>
#include <cstring>
using namespace std;
int main(void){
int num = 0, sum = 0, cnt = 0;
char ox[80];
cin >> num;
@glowing713
glowing713 / 1546.cpp
Created July 18, 2019 11:06
백준 1546번 평균
#include <iostream>
using namespace std;
int main(void){
const int SIZE = 1000;
int num = 0, max = 0;
double sum = 0;
int arr[SIZE] = {0,};
cin >> num;