当前位置:网站首页>洛谷_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;
}边栏推荐
- 優雅的自定義 ThreadPoolExecutor 線程池
- At a time of oversupply of chips, China, the largest importer, continued to reduce imports, and the United States panicked
- Redis master-slave replication, sentinel mode, cluster cluster
- Privacy computing fat offline prediction
- AutoCAD - line width setting
- Creation and use of static library (win10+vs2022
- ReentrantLock、ReentrantReadWriteLock、StampedLock
- Go error collection | when a function uses a return value with a parameter name
- Strong, weak, soft and virtual references of ThreadLocal
- 2022-06-27日报:Swin Transformer、ViT作者等共话:好的基础模型是CV研究者的朴素追求
猜你喜欢

Julia1.1 installation instructions
![[xman2018 qualifying] pass](/img/eb/7bf04941a96e9522e2b93859266cf2.png)
[xman2018 qualifying] pass

QT 如何在背景图中将部分区域设置为透明

Lei Jun lost another great general, and liweixing, the founding employee of Xiaomi No. 12, left his post. He once had porridge to create Xiaomi; Intel's $5.4 billion acquisition of tower semiconductor

Référence forte, faible, douce et virtuelle de threadlocal

What kind of experience is it to read other people's code

AQS Abstract queue synchronizer

Acwing game 57
机械硬盘和ssd固态硬盘的原理对比分析

Make a ThreadLocal (source code) that everyone can understand
随机推荐
Use GCC to generate an abstract syntax tree "ast" and dump it to Dot file and visualization
Top ten Devops best practices worthy of attention in 2022
Nvidia Deepstream 运行延迟,卡顿,死机处理办法
易周金融 | Q1手机银行活跃用户规模6.5亿;理财子公司布局新兴领域
QT 如何在背景图中将部分区域设置为透明
Interview question: rendering 100000 data solutions
Julia1.1 installation instructions
Cannot determine value type from string ‘<p>1</p>‘
Go error collection | when a function uses a return value with a parameter name
[digital signal processing] discrete time signal (analog signal, discrete time signal, digital signal | sampling leads to time discrete | quantization leads to amplitude discrete)
Excuse me, is it cost-effective to insure sunshine Optimus Prime term life insurance No. 7? What are the advantages of this product?
Pychart installation and setup
优雅的自定义 ThreadPoolExecutor 线程池
ERROR L104: MULTIPLE PUBLIC DEFINITIONS
[interview questions] common interview questions (I)
Strong, weak, soft and virtual references of ThreadLocal
E-week finance Q1 mobile banking has 650million active users; Layout of financial subsidiaries in emerging fields
Semaphore of thread synchronization
2022-2-16 learning the imitated Niuke project - Section 6 adding comments
External memory