提交时间:2026-01-04 15:28:38

运行 ID: 80713

#include <iostream> using namespace std; int main() { int N, M; cin >> N >> M; // 根据互质数性质,最多不能买到的数量为N*M - N - M cout << N * M - N - M << endl; return 0; }