일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- string 메소드
- EOF
- 매크로
- 엑셀
- 입/출력
- vscode
- 2557
- k-eta
- getline
- 이분그래프
- 연결요소
- c++
- 백준
- 입출력 패턴
- 프레임워크와 라이브러리의 차이
- Django란
- Django의 편의성
- double ended queue
- 장고란
- scanf
- 표준 입출력
- correlation coefficient
- 구조체와 클래스의 공통점 및 차이점
- 시간복잡도
- iOS14
- Django Nodejs 차이점
- 자료구조
- 알고리즘 공부방법
- UI한글변경
- string 함수
- Today
- Total
목록알고리즘/백준풀이1. 입출력 (29)
Storage Gonie
문제 풀이 # C++ #include using namespace std; int main(void) { char s[100]; while (scanf("%[^\n]\n", s) == 1) // scanf는 s 하나의 값만 받으므로 1을 반환한다. { printf("%s\n", s); } } #include using namespace std; int main(){ string str; while (true) { getline(cin, str); if (str=="") // EOF일 경우 종료 break; cout
문제 풀이 # C++ #include using namespace std; int main(void) { ios_base::sync_with_stdio(false); int N = 0; int a = 0; int b = 0; cin >> N; for (int i =0; i> a >> b; cout
문제 풀이 # C++ #include using namespace std; int main(void) { int N = 0; int a = 0; int b = 0; char c; cin >> N; while(N--) { scanf("%d%c%d", &a, &c, &b); // scanf는 공백을 무시하여 "3 , 5" 입력도 잘 받음 cout N; while(N--) { scanf("%d,%d", &a, &b); // ','를 구분자로 해서 값을 입력받음 cout
문제 풀이 # C++ #include using namespace std; int main(void) { int a = 0; int b = 0; while( cin >> a >> b && a != 0 && b != 0) { cout
문제 * 몇개의 테스트 케이스가 주어졌는지 알 수 없는 경우 입력을 EOF까지 받으면 된다. 풀이 # C #include int main(void) { int a = 0; int b = 0; while(scanf("%d %d", &a, &b) == 2) // scanf의 리턴값은 성공적으로 입력받은 변수의 개수이다. { printf("%d\n", a+b); } } # C++ #include using namespace std; int main(void) { int a = 0; int b = 0; while(cin >> a >> b) { cout
문제 나의 풀이 # C++ #include using namespace std; int main(void) { int N = 0; int a = 0; int b = 0; cin >> N; while(N--) { cin >> a >> b; cout N; for(int i=0; i> a >> b; cout
문제 풀이 # C++ #include using namespace std; int main(void) { int a = 0; int b = 0; cin >> a >> b; cout
문제 풀이 # C++ #include using namespace std; int main(void) { int a = 0; int b = 0; cin >> a >> b; cout