結果
| 問題 | No.1035 Color Box |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-04-23 22:53:08 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 287 bytes |
| コンパイル時間 | 4,460 ms |
| コンパイル使用メモリ | 251,556 KB |
| 最終ジャッジ日時 | 2025-02-12 13:35:26 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 6 WA * 30 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using mint = atcoder::modint1000000007;
using namespace std;
int main() {
int n, m;
cin >> n >> m;
mint ans = 1;
for (int i = 0; i < m; i++){
ans *= (n - i);
}
ans *= (mint(m)).pow(max(0, n - m - 1));
cout << ans.val() << endl;
}