当前位置:网站首页>Blue Bridge Cup Netizen age (violence)
Blue Bridge Cup Netizen age (violence)
2022-07-07 07:17:00 【Woodenman Du】
Question:
Title Description
This question is to fill in the blanks , Just calculate the result , Use the output statement in the code to output the filled results .
Some Junxin knows a netizen . When asked about age , His netizens said : “ My age is a 22 digit , I'm older than my son 2727 year , If I swap the two digits of my age , It's exactly the age of my son ”
Please calculate : How many possibilities are there for the age of netizens ?
Tips :3030 Age is one of the possibilities .
Operation limit
- Maximum operation time :1s
- Maximum running memory : 128M
Result: 7
Solve: Direct violence . There's nothing particular about , There is no need to spend time on optimization .
Code:
#include <iostream>
using namespace std;
int main()
{
int cnt = 0;
for(int i = 28; i <98; i++)
{
int temp = i,ans = 0;
while(temp){
ans *= 10;
ans += temp%10;
temp /= 10;
}
if(i - ans == 27) cnt++;
}
cout <<cnt;
return 0;
}Statement : For the purpose of sorting out personal questions , In case of infringement , Please contact to delete ~
边栏推荐
- Le Service MySQL manque dans le service informatique
- Jetpack compose is much more than a UI framework~
- Composition API premise
- Precise space-time travel flow regulation system - ultra-high precision positioning system based on UWB
- 选择商品属性弹框从底部弹出动画效果
- JS small exercise ---- time sharing reminder and greeting, form password display hidden effect, text box focus event, closing advertisement
- Advantages of using net core / why
- MySQL service is missing from computer service
- Implementation of AVL tree
- Initial experience of addresssanitizer Technology
猜你喜欢

How to share the same storage among multiple kubernetes clusters

Composition API premise

1089: highest order of factorial

Basic process of network transmission using tcp/ip four layer model

MIPS uclibc cross compile ffmpeg, support g711a encoding and decoding
![How to model and simulate the target robot [mathematical / control significance]](/img/bd/79f6338751b6773859435c54430ec3.png)
How to model and simulate the target robot [mathematical / control significance]

Anr principle and Practice

freeswitch拨打分机号源代码跟踪

非父子组件的通信

Esxi attaching mobile (Mechanical) hard disk detailed tutorial
随机推荐
Flexible layout (II)
虚拟机的作用
CompletableFuture使用详解
Unity3d learning notes
Anr principle and Practice
PostgreSQL source code (59) analysis of transaction ID allocation and overflow judgment methods
1090: integer power (multi instance test)
readonly 只读
.net 5 FluentFTP连接FTP失败问题:This operation is only allowed using a successfully authenticated context
詳解機器翻譯任務中的BLEU
Détailler le bleu dans les tâches de traduction automatique
transform-origin属性详解
Config distributed configuration center
js小练习
Abnova membrane protein lipoprotein technology and category display
多线程与高并发(9)——AQS其他同步组件(Semaphore、ReentrantReadWriteLock、Exchanger)
Complete process of MySQL SQL
Get the city according to IP
Advantages of using net core / why
Non empty verification of collection in SQL