結果
| 問題 | No.167 N^M mod 10 |
| コンテスト | |
| ユーザー |
wing3196
|
| 提出日時 | 2015-03-19 23:30:45 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 327 bytes |
| 記録 | |
| コンパイル時間 | 339 ms |
| コンパイル使用メモリ | 85,728 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-08-01 09:21:24 |
| 合計ジャッジ時間 | 1,816 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 14 WA * 13 |
ソースコード
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<cstring>
#include<climits>
#include<functional>
#include<map>
#include<set>
using namespace std;
int 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