#include using namespace std; int main(){ int n,m; cin >> n; cin >> m; cout << "n " << n << " m " << m << endl; int numInkBottol = m; int numWanabePainted =n; //順番にインクのバケツにいれる。 long patterns = 1; long mod = (long)pow(10,9)+7; int modInkBottle = m % mod; for (int i = modInkBottle; i > 0; i--){ if (numWanabePainted > 0){ patterns = patterns * i; patterns = patterns % mod; //cout << i << " " << patterns << endl; }else{ break; } numWanabePainted--; } cout << patterns << endl; }