Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <map>
- #include <set>
- using namespace std;
- typedef long long ll;
- int main() {
- ll n;
- cin >> n;
- int res = 0;
- for(ll i = 1; i <= n; i++) {
- if(i * i < n) {
- res++;
- }
- else {
- break;
- }
- }
- cout << res << endl;
- return 0;
- }
Advertisement
Comments
-
- #include <stdio.h>
- //Fixed SQRT, example: 10000 gives 100, not 99
- int main() {
- int n = 10000;
- int res = 0;
- for(int i = 1; i <= n; i++) {
- if(i * i <= n) {
- res++;
- }
- else {
- break;
- }
- }
- printf("%u",res);
- return 0;
- }
Add Comment
Please, Sign In to add comment
Advertisement