結果

問題 No.167 N^M mod 10
ユーザー togaerrortogaerror
提出日時 2015-04-07 00:05:20
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 165 bytes
コンパイル時間 30 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 5,180 KB
最終ジャッジ日時 2023-09-17 06:21:06
合計ジャッジ時間 1,293 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 4 ms
4,940 KB
testcase_06 WA -
testcase_07 AC 5 ms
5,064 KB
testcase_08 AC 5 ms
4,984 KB
testcase_09 AC 5 ms
4,836 KB
testcase_10 AC 5 ms
5,132 KB
testcase_11 WA -
testcase_12 AC 5 ms
5,040 KB
testcase_13 WA -
testcase_14 AC 4 ms
4,812 KB
testcase_15 AC 5 ms
4,840 KB
testcase_16 AC 4 ms
4,980 KB
testcase_17 AC 5 ms
4,944 KB
testcase_18 WA -
testcase_19 AC 5 ms
4,900 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 5 ms
4,904 KB
testcase_27 WA -
testcase_28 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

#!/usr/bin/perl

use strict;
use warnings;

my $n = <>;
my $m = <>;

$n = $n % 10;
$m = $m % 10;
my $ans;

$ans = $n ** $m;
$ans = $ans % 10;

print "$ans\n";

exit;
0