結果
問題 | No.167 N^M mod 10 |
ユーザー |
![]() |
提出日時 | 2015-04-26 11:20:57 |
言語 | D (dmd 2.109.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 241 bytes |
コンパイル時間 | 898 ms |
コンパイル使用メモリ | 99,644 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-12 02:36:07 |
合計ジャッジ時間 | 1,930 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 10 WA * 5 RE * 12 |
ソースコード
import std.array, std.stdio, std.string, std.algorithm, std.conv; void main() { long N = readln.strip.to!long % 10; long M = readln.strip.to!long; if (M == 0) writeln(1); else { writeln(N ^^ (M % 4) % 10); } }