80pts求助

P1618 三连击(升级版)

zhaohanwen @ 2023-01-05 11:06:10

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int e,d,f,total=0;
    cin>>d>>e>>f;
    for(int a=34;a<=999;a++)
    {
        int c=(f/d)*a;
        int b=(e/d)*a;
        if(a/100+a/10%10+a%10+b/100+b/10%10+b%10+c/100+c/10%10+c%10==1+2+3+4+5+6+7+8+9 and (a/100)*(a/10%10)*(a%10)*(b/100)*(b/10%10)*(b%10)*(c/100)*(c/10%10)*(c%10)==1*2*3*4*5*6*7*8*9)
        {
            total++;
            cout<<a<<' '<<b<<' '<<c<<endl;
        }
    } 
    if(total==0)
    {
        cout<<"No!!!"<<endl;
    }
    return 0;
}

by zhaohanwen @ 2023-01-05 11:14:26

记录


by WA_sir @ 2023-01-05 11:33:33

@zhaohanwen 逝逝 2 4 7


by zhaohanwen @ 2023-01-05 11:35:25

@WA_sir 行


by zhaohanwen @ 2023-01-05 11:37:37

2 4 7

192 384 576

219 438 657

273 546 819

327 654 981

Process exited after 2.823 seconds with return value 0


by zhaohanwen @ 2023-01-05 11:39:02

好像。。。。没什么问题啊@WA_sir


by WA_sir @ 2023-01-05 13:05:11

@zhaohanwen 你确定 19257627相等?


by Tx12345678 @ 2023-01-11 07:57:50

576 \div 7 = ?

by Tx1234567 @ 2023-01-23 15:11:40

576 \div 7 = 82.2857142857142918046520208008587360382080078125000000000000000000000000000000000000000000000000000000

by DINGYURS @ 2023-01-28 16:23:55

@zhaohanwen 可能是int的问题,把小数点抹掉了


|