博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
【蓝桥杯】马虎的算式
阅读量:3960 次
发布时间:2019-05-24

本文共 505 字,大约阅读时间需要 1 分钟。

马虎的算式

题目

题目

#include
using namespace std;int main(){
int f=0; for( int a=1;a<10;++a){
for(int b=1;b<10;++b){
if(b!=a){
for( int c=1;c<10;++c){
if( c!=a && c!=b){
for(int d=1;d<10;++d){
if( d!=a&&d!=b&&d!=c){
for(int e=1;e<10;++e){
if( e!=a&&e!=b&&e!=c&&e!=d){
if((a*10+b) * (c*100+d*10+e) == (a*100+d*10+b)*(c*10+e)) f++; } } } } } } } } } cout << f << endl; return 0;}

转载地址:http://pwlzi.baihongyu.com/

你可能感兴趣的文章