結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 5 ms
5,008 KB
testcase_06 WA -
testcase_07 AC 5 ms
4,928 KB
testcase_08 AC 5 ms
5,044 KB
testcase_09 AC 4 ms
5,056 KB
testcase_10 AC 5 ms
4,896 KB
testcase_11 WA -
testcase_12 AC 5 ms
4,928 KB
testcase_13 WA -
testcase_14 AC 4 ms
4,980 KB
testcase_15 AC 4 ms
4,900 KB
testcase_16 AC 5 ms
5,084 KB
testcase_17 AC 5 ms
5,008 KB
testcase_18 WA -
testcase_19 AC 4 ms
5,040 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 5 ms
5,204 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