博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
51nod 1240:莫比乌斯函数
阅读量:7111 次
发布时间:2019-06-28

本文共 504 字,大约阅读时间需要 1 分钟。

面向题意编程。。

#include
using namespace std;typedef long long LL;int cal(int n){ int ret=1; for(int i=2;i*i<=n;i++) if(n%i==0) { int cnt=0; while(n%i==0) { n/=i; cnt++; if(cnt>1) return 0; } ret=-ret; } if(n>1) ret=-ret; return ret;}int main(){ int n; while(cin>>n) cout<
<

 

转载于:https://www.cnblogs.com/Just--Do--It/p/6410760.html

你可能感兴趣的文章
MinGW下编译openssl, json-c
查看>>
thinkphp跨模块调用
查看>>
Go 文件操作(创建、打开、读、写)
查看>>
JS获取周、月、季度日期
查看>>
python 异步采集,网页爬虫编写 | 一步一步学python
查看>>
Flash调用XML文件的方法
查看>>
Android ArrayAdapter 详解
查看>>
【iOS开发笔记26/50】我自己写的苹果应用程序XQViewer终于上架了,解决了一系列的问题,终于挺过来了...
查看>>
JSF---->其他标签
查看>>
Python应用01 原始Python服务器
查看>>
Add Console Application Program to the MFC Program
查看>>
Oracle中可被并行化执行的SQL操作
查看>>
新的Layout布局系统
查看>>
java链表
查看>>
VC获取操作系统版本和名称
查看>>
iOS: 消息通信中的Notification&KVO
查看>>
FZU Problem 2105 Digits Count
查看>>
禁止复制
查看>>
Accessing Hardware in Silverlight using COM
查看>>
工具箱 - Xshell <2>
查看>>