P3951 Oscar doubts

This is the first title in 2017 to improve the group, is a primary school Olympiad title? I heard a lot of big brothers burst zero, and I AC up ,,,

The maximum number of this title is given first two prime numbers, asks for any number of two Primes and can not reach that number? First get this question very Meng, then tried a sample and did not get any inspiration, so he conceived the code, which would like to double the number of cycles for two numbers, but how do the maximum? Then again to analyze the data. eg.7 & 3 = 11,2 & 5 = 3,3 $ 4 = 5. Suddenly, I found that these values are a * b- (a + b) . However, to see the data range, found 1 * 10 ^ 9 -> 1 * 10 ^ 18, they must be open long long.

1. get this "Mathematical Olympiad", be sure to thoroughly analyze the data to find the formula, Rethinking principle to verify the correctness of the formula, provided that the data must be considered to

2. Note that the data range calculation

Code

#include<iostream>
#include<cstdio>
using namespace std;
int main(){
    long long a,b;
    cin>>a>>b;
    cout<<(a*b)-(a+b);
    return 0;
}

Yes, the title of the code may be the history of the most simple.

Guess you like

Origin www.cnblogs.com/china-mjr/p/11330005.html