結果
| 問題 | No.167 N^M mod 10 |
| コンテスト | |
| ユーザー |
agatan
|
| 提出日時 | 2015-04-26 11:20:57 |
| 言語 | D (dmd 2.112.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 241 bytes |
| 記録 | |
| コンパイル時間 | 506 ms |
| コンパイル使用メモリ | 83,548 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2026-03-05 06:28:14 |
| 合計ジャッジ時間 | 1,373 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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);
}
}
agatan