当前位置:网站首页>洛谷_P1008 [NOIP1998 普及组] 三连击_枚举
洛谷_P1008 [NOIP1998 普及组] 三连击_枚举
2022-06-27 15:23:00 【这题AC再睡.】
洛谷_P1008 [NOIP1998 普及组] 三连击_枚举

//
#include<bits/stdc++.h>
using namespace std;
bool f( int in )
{
int cnt[11];
memset( cnt,0,sizeof( cnt ) );
int a=in,b=2*in,c=3*in;
while( a ) { cnt[a%10]++; a/=10; }
while( b ) { cnt[b%10]++; b/=10; }
while( c ) { cnt[c%10]++; c/=10; }
for( int i=1;i<=9;i++ )
if( cnt[i]!=1 ) return false;
return true;
}
int main()
{
for( int i=123;i<333;i++ )
if( f( i ) )
cout<<i<<" "<<2*i<<" "<<3*i<<endl;
return 0;
}边栏推荐
- ThreadLocal之强、弱、软、虚引用
- Unity3d best practices: folder structure and source control
- E-week finance Q1 mobile banking has 650million active users; Layout of financial subsidiaries in emerging fields
- CAS之比较并交换
- 海量数据!秒级分析!Flink+Doris构建实时数仓方案
- élégant pool de threadpoolexecutor personnalisé
- Piblup test report 1- pedigree based animal model
- 图书管理系统
- About sitemap XML problems
- Brief reading of dynamic networks and conditional computing papers and code collection
猜你喜欢

Derivation of Halcon camera calibration principle

CAS之比较并交换

How QT sets some areas to be transparent in the background image

Leetcode 724. 寻找数组的中心下标(可以,一次过)

PostgreSQL 15新版本特性解读(含直播问答、PPT资料汇总)

Top ten Devops best practices worthy of attention in 2022

What is the London Silver code

Pri3d: a representation learning method for 3D scene perception using inherent attributes of rgb-d data
![[digital signal processing] discrete time signal (analog signal, discrete time signal, digital signal | sampling leads to time discrete | quantization leads to amplitude discrete)](/img/80/28d53985d56d64ca721b26e846c667.jpg)
[digital signal processing] discrete time signal (analog signal, discrete time signal, digital signal | sampling leads to time discrete | quantization leads to amplitude discrete)

漏洞复现----34、yapi 远程命令执行漏洞
随机推荐
What is the London Silver unit
Volatile and JMM
Redis master-slave replication, sentinel mode, cluster cluster
E-week finance Q1 mobile banking has 650million active users; Layout of financial subsidiaries in emerging fields
R language error
Getting to know cloud native security for the first time: the best guarantee in the cloud Era
Teach you how to package and release the mofish Library
HTTP Caching Protocol practice
ReentrantLock、ReentrantReadWriteLock、StampedLock
【微服务|Sentinel】热点规则|授权规则|集群流控|机器列表
ERROR L104: MULTIPLE PUBLIC DEFINITIONS
海量数据!秒级分析!Flink+Doris构建实时数仓方案
Sword finger offer II 039 Histogram maximum rectangular area monotonic stack
Hyperledger Fabric 2. X custom smart contract
[WUSTCTF2020]girlfriend
专家:让你低分上好校的都是诈骗
Buuctf Misc
How is the London Silver point difference calculated
Interview question: rendering 100000 data solutions
做一篇人人能搞懂的ThreadLocal(源码)