結果
問題 |
No.167 N^M mod 10
|
ユーザー |
|
提出日時 | 2016-03-30 20:19:39 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 260 bytes |
コンパイル時間 | 655 ms |
コンパイル使用メモリ | 58,620 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-02 08:16:19 |
合計ジャッジ時間 | 1,580 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 14 WA * 13 |
ソースコード
#include <iostream> #include <string> #include <cmath> std::string m, n; int main() { std::ios::sync_with_stdio(false); std::cin.tie(0); std::cin >> n >> m; std::cout << std::fmod(std::pow(n.back()-'0', m.back()-'0'), 10); return 0; }