,
a
,
B
Respectively
A
Key and
B
Corresponding value of the key,
c
Indicates the initial value displayed by the calculator.
(2 ^ 95
Indicate
2
of
95
Power
)
Output
(Please use standard input and output, not to read and write)
There is only one number, ie
A
The minimum of the number of keys is pressed
(
We ensure that the entered situation has corresponding answers
)
Sample input
1
Sample output
1
7 12 8
4
Sample input
2
Sample output
2
10549830 6549835 5
140969
#include #include #include // # include #include "math.h"
Void main () {Double A, B, C; INT j = 0; INT DI = 0, DJ; INT i = 0; BOOL ACC = FALSE; BOOL ACC = FALSE; Double Temp; Bool Flag = False; int Times = 1000000; cout << "Input three digital ABC:" << endl; cin >> a >> b >> C; for (i = 0; i <100000 &&! Flag; i ) /// {for ( J = 0; j <100000 &&! flag; j ) {IF ((i * a j * b) == c) {TIMES = i; di = i; dj = j; flag = true;} IF ((i * a j * b)> c) Break;} if (i * a> c) Break;} flag = false; cout << "2 ================= ============ "<< endl; for (i = 0; I -300000 &&! flag; j--) {= ((Temp J * B)> C &&! ACC) // jiasu ACC {J = J-3000; Continue;} else if ACC) {ACC = true; j = j 3000;} IF ((Temp J * B)> C &&! ACCC) // Accelerates ACCC {J = J-600; Continue;} else if (! acid) {acid = True; j = j 600;}
IF ((Temp J * B) == C) f (i -times &&! flag; i -) // - {ACC = false; acid = false; temp = i * a; for (j = 0; j <1000000 &&! flag; j ) {IF ((Temp J * b) c) Break;} IF ((TIMES / 100)! = 0) IF ( (-i)% (TIMES / 100) == 99) cout << (- i) * 100 / Times << "%" << endl;} cout << "Enter the fourth algorithm" << endl; for (i = 0; i> -times &&! flag; i -) // - - {TEMP = i * a; ACC = FALSE For (j = 0; j> -times &&! flag; j -) {if ((Temp J * b)> C &&! ACC) {J = J-3000; Continue;} else if (! ACC) {ACC = True; j = j 3000;}