結果
| 問題 | No.167 N^M mod 10 |
| コンテスト | |
| ユーザー |
wing3196
|
| 提出日時 | 2015-03-19 23:31:55 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 352 bytes |
| 記録 | |
| コンパイル時間 | 490 ms |
| コンパイル使用メモリ | 88,272 KB |
| 実行使用メモリ | 19,272 KB |
| 最終ジャッジ日時 | 2026-03-18 06:06:27 |
| 合計ジャッジ時間 | 29,296 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 TLE * 14 |
ソースコード
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<cstring>
#include<climits>
#include<functional>
#include<map>
#include<set>
using namespace std;
#define int long long
signed main(){
int N,M;
cin>>N>>M;
int ans = 1;
for(int i=0;i<M;i++){
ans *= N; ans %= 10;
}
printf("%d\n",ans);
return 0;
}
wing3196