CSU七月校赛A

 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 */
View Code

 

转载于:https://www.cnblogs.com/Roni-i/p/7253976.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值