当前位置:网站首页>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;
}边栏推荐
- AI begets the moon, and thousands of miles share the literary heart
- Admixture usage document Cookbook
- Experience sharing of mathematical modeling: comparison between China and USA / reference for topic selection / common skills
- Design of digital video signal processor based on FPGA (with main code)
- Strong, weak, soft and virtual references of ThreadLocal
- Design and implementation of food recipe and ingredients website based on vue+node+mysql
- Use of abortcontroller
- Teach you how to realize pynq-z2 bar code recognition
- 数学建模经验分享:国赛美赛对比/选题参考/常用技巧
- Today, Teng Xu came out with 37k during the interview. It's really a miracle. He showed me his skill
猜你喜欢

洛谷入门2【分支结构】题单题解

HTTP Caching Protocol practice

Pisa-Proxy 之 SQL 解析实践

Design and implementation of reading app based on Web Platform

All you want to know about large screen visualization is here
![洛谷_P1008 [NOIP1998 普及组] 三连击_枚举](/img/9f/64b0b83211bd1c615f2db9273bb905.png)
洛谷_P1008 [NOIP1998 普及组] 三连击_枚举

R language error

Reflection learning summary

Hyperledger Fabric 2. X custom smart contract

Programming skills: script scheduling
随机推荐
原子操作类
洛谷入门1【顺序结构】题单题解
[advanced mathematics] from normal vector to surface integral of the second kind
AI begets the moon, and thousands of miles share the literary heart
ThreadLocal之强、弱、软、虚引用
PSS: vous n'êtes qu'à deux niveaux du NMS Free + Lifting point | 2021 Paper
Google tool splits by specified length
Knowledge map model
Design of spread spectrum communication system based on FPGA (with main code)
Julia1.1 installation instructions
Design of direct spread spectrum communication system based on FPGA (with main code)
Cannot determine value type from string ‘<p>1</p>‘
2022-06-27日报:Swin Transformer、ViT作者等共话:好的基础模型是CV研究者的朴素追求
Design and implementation of food recipe and ingredients website based on vue+node+mysql
[issue 18] share a Netease go classic
R language triple becomes matrix matrix becomes triple
基于Vue+Node+MySQL的美食菜谱食材网站设计与实现
Strong, weak, soft and virtual references of ThreadLocal
Top ten Devops best practices worthy of attention in 2022
E ModuleNotFoundError: No module named ‘psycopg2‘(已解决)