結果
| 問題 | 
                            No.16 累乗の加算
                             | 
                    
| コンテスト | |
| ユーザー | 
                             mencotton
                         | 
                    
| 提出日時 | 2018-01-18 20:18:45 | 
| 言語 | C#(csc)  (csc 3.9.0)  | 
                    
| 結果 | 
                             
                                MLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 642 bytes | 
| コンパイル時間 | 1,034 ms | 
| コンパイル使用メモリ | 110,464 KB | 
| 実行使用メモリ | 809,908 KB | 
| 最終ジャッジ日時 | 2024-12-24 11:28:24 | 
| 合計ジャッジ時間 | 33,536 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | MLE * 14 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Linq;
namespace _16
{
    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[] l = new long[100000000]; l[0] = 1;
            long ret = 0;
            for (int j = 1; j < 100000000; j++)
            {
                l[j] = l[j - 1] * x[0] % 1000003;
            }
            for (int i = 0; i < x[1]; i++)
            {
                ret += l[a[i]];
            }
            Console.WriteLine(ret);
        }
    }
}
            
            
            
        
            
mencotton