結果
| 問題 |
No.167 N^M mod 10
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-02-16 23:20:03 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 177 bytes |
| コンパイル時間 | 554 ms |
| コンパイル使用メモリ | 53,840 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-23 05:58:34 |
| 合計ジャッジ時間 | 1,591 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 11 WA * 16 |
ソースコード
#include<iostream>
using namespace std;
int main(){
int N,M;
cin >> N >>M;
N%=10;
M%=4;
int ans=1;
int i;
for(i=0;i<M;i++){
ans=ans*N%10;
}
cout << ans;
}