結果
問題 |
No.167 N^M mod 10
|
ユーザー |
|
提出日時 | 2016-11-13 12:58:54 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 281 bytes |
コンパイル時間 | 692 ms |
コンパイル使用メモリ | 107,832 KB |
実行使用メモリ | 45,148 KB |
最終ジャッジ日時 | 2024-11-25 21:55:17 |
合計ジャッジ時間 | 6,159 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 RE * 12 TLE * 2 |
コンパイルメッセージ
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) { long N = long.Parse(Console.ReadLine()); long M = long.Parse(Console.ReadLine()); long ret = 1; for(long i=0; i<M; i++) { ret = ((ret % 10) * (N % 10)) % 10; } Console.WriteLine(ret); } }