当前位置:网站首页>Luogu_ P1008 [noip1998 popularization group] triple strike_ enumeration
Luogu_ P1008 [noip1998 popularization group] triple strike_ enumeration
2022-06-27 15:33:00 【This question AC sleep again】
Luogu _P1008 [NOIP1998 Popularization group ] Three strikes in a row _ enumeration

//
#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;
}边栏推荐
- 【170】PostgreSQL 10字段类型从字符串修改成整型,报错column cannot be cast automatically to type integer
- Volatile and JMM
- R language triple becomes matrix matrix becomes triple
- [high concurrency] deeply analyze the callable interface
- AI begets the moon, and thousands of miles share the literary heart
- Julia1.1 installation instructions
- SQL parsing practice of Pisa proxy
- All you want to know about large screen visualization is here
- Interpretation of new version features of PostgreSQL 15 (including live Q & A and PPT data summary)
- Strong, weak, soft and virtual references of ThreadLocal
猜你喜欢

反射学习总结

Talk about redis transactions

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

E ModuleNotFoundError: No module named ‘psycopg2‘(已解决)

洛谷入门1【顺序结构】题单题解

Why can't the start method be called repeatedly? But the run method can?

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

#28对象方法扩展

Professor huangxutao, a great master in CV field, was born at the age of 86. UIUC specially set up a doctoral scholarship to encourage cutting-edge students

洛谷入门2【分支结构】题单题解
随机推荐
设计原则和思想:设计原则
Is flutter easy to learn? How to learn? The most complete introduction and actual combat of flutter in history. Take it away without thanks~
Google tool splits by specified length
Maximum profit of stock (offer 63)
16 -- 删除无效的括号
Strong, weak, soft and virtual references of ThreadLocal
Eolink 推出面向中小企业及初创企业支持计划,为企业赋能!
CAS comparison and exchange
E-week finance Q1 mobile banking has 650million active users; Layout of financial subsidiaries in emerging fields
基于SSM的Web网页聊天室系统
AbortController的使用
R language error
What kind of experience is it to read other people's code
PSS: vous n'êtes qu'à deux niveaux du NMS Free + Lifting point | 2021 Paper
Use GCC to generate an abstract syntax tree "ast" and dump it to Dot file and visualization
Beginner level Luogu 2 [branch structure] problem list solution
易周金融 | Q1手机银行活跃用户规模6.5亿;理财子公司布局新兴领域
Interpretation of new version features of PostgreSQL 15 (including live Q & A and PPT data summary)
Web chat room system based on SSM
Using redis skillfully to realize the like function, isn't it more fragrant than MySQL?