当前位置:网站首页>洛谷_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;
}边栏推荐
- my. INI file configuration
- ERROR L104: MULTIPLE PUBLIC DEFINITIONS
- Naacl 2022 | TAMT: search the transportable Bert subnet through downstream task independent mask training
- Pisa-Proxy 之 SQL 解析实践
- February 16, 2022 freetsdb compilation and operation
- LVI: feature extraction and sorting of lidar subsystem
- What kind of experience is it to read other people's code
- Redis CacheClient
- Design and implementation of food recipe and ingredients website based on vue+node+mysql
- What are the characteristics of fixed income + products?
猜你喜欢

QT notes (XXVIII) using qwebengineview to display web pages

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

Is flutter easy to learn? How to learn? The most complete introduction and actual combat of flutter in history. Take it away without thanks~

直播app运营模式有哪几种,我们该选择什么样的模式?

Pycharm安装与设置

ReentrantLock、ReentrantReadWriteLock、StampedLock

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

At a time of oversupply of chips, China, the largest importer, continued to reduce imports, and the United States panicked

Semaphore of thread synchronization

ThreadLocal之强、弱、软、虚引用
随机推荐
海外仓知识科普
QT notes (XXVIII) using qwebengineview to display web pages
Creation and use of static library (win10+vs2022
Use GCC to generate an abstract syntax tree "ast" and dump it to Dot file and visualization
[an Xun cup 2019]attack
[digital signal processing] discrete time signal (discrete time signal knowledge points | signal definition | signal classification | classification according to certainty | classification according t
AQS Abstract queue synchronizer
Je veux acheter des produits à revenu fixe + mais je ne sais pas quels sont ses principaux investissements.
Maximum profit of stock (offer 63)
About sitemap XML problems
隱私計算FATE-離線預測
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
[PHP code injection] common injectable functions of PHP language and utilization examples of PHP code injection vulnerabilities
Jupiter core error
Redis persistence
[high concurrency] deeply analyze the callable interface
CAS comparison and exchange
What is the London Silver code
The global chip market may stagnate, and China's chip expansion accelerates to improve its self-sufficiency rate against the trend
Teach you how to realize pynq-z2 bar code recognition