結果
問題 | No.16 累乗の加算 |
ユーザー |
![]() |
提出日時 | 2017-12-31 22:03:42 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 699 bytes |
コンパイル時間 | 1,118 ms |
コンパイル使用メモリ | 103,680 KB |
実行使用メモリ | 28,288 KB |
最終ジャッジ日時 | 2024-12-21 15:36:25 |
合計ジャッジ時間 | 70,090 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 TLE * 11 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;using System.Collections.Generic;using System.Linq;namespace Test{class Program{static void Main(string[] args){int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray();int[] a = Console.ReadLine().Split().Select(int.Parse).ToArray();long ret = 0;for (int i = 0; i < x[1]; i++){long l = 1;for (int j = 0; j < a[i]; j++){l *= x[0];l %= 1000003;}ret += l;ret %= 1000003;}Console.WriteLine(ret);}}}