#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
int n;
int m;
int e=10;
int f=9;
int c;
int g=1;
int h;
int d = pow(e,f)+7;
vector <int> vec;
int main() {
cin>>n;
cin>>m;
if(n==1){
cout<<c%d;
}
else{
if(m==1){
cout<<g%d;
}
else{
if(n==m){
h=pow(m,n)/m;
cout<<h%d;
}
}
}
return 0;
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | #include <cmath> #include <iostream> #include <vector> using namespace std; int n; int m; int e=10; int f=9; int c; int g=1; int h; int d = pow(e,f)+7; vector <int> vec; int main() { cin>>n; cin>>m; if(n==1){ cout<<c%d; } else{ if(m==1){ cout<<g%d; } else{ if(n==m){ h=pow(m,n)/m; cout<<h%d; } } } return 0; } |
English