Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- 오퍼레이팅시스템
- 개발
- 백준
- 너비우선탐색
- 그래프
- Computer science
- 정석학술정보관
- 컴공과
- 구현
- 컴퓨터공학과
- 코딩
- 문제풀이
- Stack
- 코테
- 브루트포스
- OS
- 스택
- DP
- coding
- 정석
- Operating System
- 오에스
- 알고리즘
- 컴공
- vector
- bfs
- 북리뷰
- cs
- c++
- 자료구조
Archives
- Today
- Total
Little Jay
[C++] 백준 2417번 - 정수 제곱근 본문
사실 이분 탐색으로 안풀었는데 맞았다.....
이건 맞았는데 13706번은 왜 틀린지 모르겠다
#include <iostream>
#include <cmath>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
long long n;
cin >> n;
long long temp = sqrt(n);
if (pow(temp, 2) == n)
cout << temp << '\n';
else
cout << temp + 1 << "\n";
return 0;
}'알고리즘 > BOJ' 카테고리의 다른 글
| [C++] 백준 17219번 - 비밀번호 찾기 (0) | 2021.08.16 |
|---|---|
| [C++] 백준 11723번 - 집합 (0) | 2021.08.14 |
| [C++] 백준 13777번 - Hunt The Rabbit (0) | 2021.08.08 |
| [C++] 백준 1654번 - 랜선 자르기(retry needed) (0) | 2021.08.08 |
| [C++] 백준 1453번 - 피시방 알바 (0) | 2021.08.07 |
Comments