結果
問題 |
No.167 N^M mod 10
|
ユーザー |
|
提出日時 | 2016-11-13 12:55:29 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 275 bytes |
コンパイル時間 | 845 ms |
コンパイル使用メモリ | 107,688 KB |
実行使用メモリ | 25,432 KB |
最終ジャッジ日時 | 2024-11-25 21:54:45 |
合計ジャッジ時間 | 2,602 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 RE * 14 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; class NMmod10 { static public void Main(string[] args) { int N = int.Parse(Console.ReadLine()); int M = int.Parse(Console.ReadLine()); int ret = 1; for(int i=0; i<M; i++) { ret = ((ret % 10) * (N % 10)) % 10; } Console.WriteLine(ret); } }