結果
| 問題 |
No.8047 Riddle of Cards
|
| ユーザー |
ahe100
|
| 提出日時 | 2019-04-01 22:16:26 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 786 bytes |
| コンパイル時間 | 1,540 ms |
| コンパイル使用メモリ | 165,792 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-27 03:08:35 |
| 合計ジャッジ時間 | 1,987 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 6 WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0;i<((int)(n));i++)
#define reg(i,a,b) for(int i = ((int)(a));i<=((int)(b));i++)
#define irep(i,n) for(int i = ((int)(n)-1);i>=0;i--)
#define ireg(i,a,b) for(int i = ((int)(b));i>=((int)(a));i--)
typedef long long ll;
typedef pair<ll, ll> mp;
ll mod = 1e9+7;
/*
There are 𝑁 cards on the table. Each cards are numbered from 1 to 𝑁. Mr.yuki should write an integer, which is no less than 1 and no more than 𝑀, on each cards. How many ways to write?
𝑁, 𝑀 are intgers between 1 and 16.
Output the answer in single line.
*/
ll n,m;
ll mod_pow(ll x,ll n){
ll res=1;
while(n){
if(n&1) res*=x;
x*=x;
n>>=1;
}
return res;
}
int main(void){
cin>>n>>m;
cout<<mod_pow(m,n)<<endl;
return 0;
}
ahe100