結果
問題 |
No.167 N^M mod 10
|
ユーザー |
![]() |
提出日時 | 2016-05-21 09:42:49 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 258 bytes |
コンパイル時間 | 434 ms |
コンパイル使用メモリ | 55,328 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-06 16:35:44 |
合計ジャッジ時間 | 1,484 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 WA * 12 |
ソースコード
#include <iostream> #define rep(i,a,b) for(int i=(a);i<(b);i++) using namespace std; int calc(int n, int m) { int x = 1; rep(i,0,m) x = (x * n%10) % 10; return x; } int main(void) { int n, m; cin >> n >> m; cout << calc(n,m) << endl; return 0; }