結果
| 問題 |
No.167 N^M mod 10
|
| コンテスト | |
| ユーザー |
naimonon77
|
| 提出日時 | 2015-09-18 23:15:25 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 365 bytes |
| コンパイル時間 | 446 ms |
| コンパイル使用メモリ | 58,236 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-07-19 07:09:53 |
| 合計ジャッジ時間 | 2,810 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 2 |
| other | AC * 1 TLE * 1 -- * 25 |
ソースコード
#include <iostream>
using namespace std;
#include <cstdio>
#include <string.h>
#include <stdlib.h>
#include <math.h>
typedef long long ll;
typedef long double lb;
int l[3];
int main(void)
{
int i,j,k;
int memory[2];
ll n,m;
ll ans = 0;
cin >> n >> m;
ans = 1;
for(i=0;i<m;i++) ans = (ans*n) % 10;
cout << ans << endl;
return 0;
}
naimonon77