当前位置:网站首页>聪明人的游戏提高篇:第三章第二课:“桐桐数”(number)
聪明人的游戏提高篇:第三章第二课:“桐桐数”(number)
2022-08-02 05:12:00 【闪耀的天狼星】
#include <iostream>
#include <cstdio>
using namespace std;
long long n,i,j,s=2;
int t(int a)
{
for (j=2;j*j<=a;j++)
if (a%j==0)
return 0;
if (a>1)
return 1;
return 0;
}
int main()
{
cin >>n;
for (i=2;i*i<=n;i++)
if (n%i==0)
s+=2;
i--;
if (i*i==n && !t(i))
s--;
if (s==4)
cout <<"It's a Tongtong number.";
else
cout <<"It's not a Tongtong number.";
return 0;
}边栏推荐
- Contents of encoding-indexes.js file printed with Bluetooth:
- 51单片机外设篇:红外通信
- 深度学习——CNN实现MNIST手写数字的识别
- 面试官:设计“抖音”直播功能测试用例吧
- Brush LeetCode topic series - 10. Regular expression match
- Go language study notes - grpc serverclient protobuf Go language from scratch
- 说好的女程序员做测试有优势?面试十几家,被面试官虐哭~~
- What are the ways to improve software testing capabilities?After reading this article, it will take you up a notch
- Google notes cut hidden plug-in installation impression
- 自动化运维工具——ansible、概述、安装、模块介绍
猜你喜欢

【合集- 行业解决方案】如何搭建高性能的数据加速与数据编排平台

25K测试老鸟6年经验的面试心得,四种公司、四种问题…

5年在职经验之谈:2年功能测试、3年自动化测试,从入门到不可自拔...

Cyber Security Learning - Intranet Penetration 4

51 microcontroller peripherals article: dot-matrix LCD

There are more and more talents in software testing. Why are people still reluctant to take the road of software testing?

网安学习-内网渗透4

家用 NAS 服务器(4)| MergerFS和SnapRaid数据定时备份

What do interview test engineers usually ask?The test supervisor tells you

Install and use Google Chrome
随机推荐
程序员最重要的能力是什么?
Polar Parametrization for Vision-based Surround-View 3D Detection 论文笔记
关于鸿蒙系统 JS UI 框架源码的分析
软件测试在职2年跳槽4次,你还在怪老板不给你涨薪?
为什么4个字节的float要比8个字节的long大呢?
The Go language learning notes - dealing with timeout - use the language from scratch from Context
6W+字记录实验全过程 | 探索Alluxio经济化数据存储策略
51单片机外设篇:DS18B20
程序员写PPT的小技巧
Differences between i++ and ++i in loops in C language
C language entry combat (13): decimal number to binary
金山云团队分享 | 5000字读懂Presto如何与Alluxio搭配
165.比较版本号
提高软件测试能力的方法有哪些?看完这篇文章让你提升一个档次
测试环境要多少?从成本与效率说起
Introduction to Grid Layout
Redis-集群模式(主从复制模式,哨兵模式,集群化模式)
APP Bluetooth connection test of test technology
Meta公司新探索 | 利用Alluxio数据缓存降低Presto延迟
51 microcontroller peripherals article: dot-matrix LCD