結果
| 問題 |
No.1518 Simple Combinatorics
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-05-28 21:14:58 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 195 bytes |
| コンパイル時間 | 873 ms |
| コンパイル使用メモリ | 65,792 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-07 08:50:20 |
| 合計ジャッジ時間 | 1,434 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 |
コンパイルメッセージ
main.cpp:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
5 | main()
| ^~~~
ソースコード
#include<iostream>
#include<atcoder/modint>
using namespace std;
using mint=atcoder::modint1000000007;
main()
{
int N,K;
cin>>N>>K;
mint n=N;
cout<<(n*(n.pow(K)-(n-1).pow(K))).val()<<endl;
}