1 /*#include <iostream> 2 #include<cstdio> 3 #include<algorithm> 4 #include<cstring> 5 using namespace std; 6 7 int main() 8 { 9 long long n; 10 int a[100]; 11 int t; 12 long long cnt; 13 while(~scanf("%lld",&n)) 14 { 15 cnt=0; 16 memset(a,0,sizeof(a)); 17 for(int i=1;i<=n;i++) 18 { 19 //a[1]= 20 for(int t=1;t<=n;t++) 21 { 22 if(t%i==0) 23 a[t]=!a[t]; 24 25 } 26 } 27 for(int i=1;i<=n;i++) 28 { 29 if(a[i]==1) 30 cnt++; 31 } 32 33 printf("%lld\n",cnt); 34 } 35 return 0; 36 } 37 */ 38 #include <iostream> 39 #include<cstdio> 40 #include<algorithm> 41 #include<cstring> 42 #include<cmath> 43 using namespace std; 44 typedef long long ll; 45 int main() 46 { 47 ll n; 48 while(~scanf("%lld",&n)) 49 { 50 printf("%d\n",(int)sqrt(n)); 51 } 52 return 0; 53 } 54 /* 55 #include <iostream> 56 #include<cstdio> 57 #include<algorithm> 58 #include<cstring> 59 using namespace std; 60 typedef long long ll; 61 int main() 62 { 63 ll n; 64 ll cnt; 65 while(~scanf("%lld",&n)) 66 { 67 cnt=0; 68 for(ll i=1;i<=n/2;i++) 69 { 70 if(n%i==0) 71 cnt++; 72 } 73 printf("%lld\n",cnt); 74 75 } 76 return 0; 77 } 78 */
时间: 2024-10-15 08:26:29