当前位置:网站首页>洛谷_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;
}边栏推荐
- ReentrantLock、ReentrantReadWriteLock、StampedLock
- The global chip market may stagnate, and China's chip expansion accelerates to improve its self-sufficiency rate against the trend
- Design skills of main function of Blue Bridge Cup single chip microcomputer
- Hyperledger Fabric 2. X custom smart contract
- About the meaning of the first two $symbols of SAP ui5 parameter $$updategroupid
- Abnormal analysis of pcf8591 voltage measurement data
- Notes learning summary
- 原子操作类
- Great God developed the new H5 version of arXiv, saying goodbye to formula typography errors in one step, and the mobile phone can easily read literature
- Naacl 2022 | TAMT: search the transportable Bert subnet through downstream task independent mask training
猜你喜欢

The global chip market may stagnate, and China's chip expansion accelerates to improve its self-sufficiency rate against the trend

Integration of entry-level SSM framework based on XML configuration file

Make a ThreadLocal (source code) that everyone can understand

漏洞复现----34、yapi 远程命令执行漏洞
![[an Xun cup 2019]attack](/img/1a/3e82a54cfcb90ebafebeaa8ee1ec01.png)
[an Xun cup 2019]attack

基于Vue+Node+MySQL的美食菜谱食材网站设计与实现

2022-2-15 learning the imitated Niuke project - Section 5 shows comments

2022-2-16 learning the imitated Niuke project - Section 6 adding comments

In the past, domestic mobile phones were arrogant in pricing and threatened that consumers would like to buy or not, but now they have plummeted by 2000 for sale

Derivation of Halcon camera calibration principle
随机推荐
What kind of experience is it to read other people's code
Derivation of Halcon camera calibration principle
élégant pool de threadpoolexecutor personnalisé
老师能给我说一下固收+产品主要投资于哪些方面?
Buuctf Misc
AbortController的使用
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
基于Vue+Node+MySQL的美食菜谱食材网站设计与实现
Programming skills: script scheduling
Longest substring without repeated characters (Sword finger offer 48)
海外仓知识科普
关于 SAP UI5 参数 $$updateGroupId 前面两个 $ 符号的含义
Today, Teng Xu came out with 37k during the interview. It's really a miracle. He showed me his skill
About the meaning of the first two $symbols of SAP ui5 parameter $$updategroupid
June 27, 2022 Daily: swin transformer, Vit authors and others said: a good basic model is the simple pursuit of CV researchers
優雅的自定義 ThreadPoolExecutor 線程池
Référence forte, faible, douce et virtuelle de threadlocal
LVI: feature extraction and sorting of lidar subsystem
图书管理系统
避孕套巨头过去两年销量下降40% ,下降原因是什么?