結果

問題 No.2671 NUPC Decompressor
ユーザー kabosukekabosuke
提出日時 2024-03-15 21:48:58
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 60 ms / 2,000 ms
コード長 1,289 bytes
コンパイル時間 7,347 ms
コンパイル使用メモリ 156,720 KB
実行使用メモリ 179,380 KB
最終ジャッジ日時 2024-03-15 21:49:26
合計ジャッジ時間 8,520 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
32,420 KB
testcase_01 AC 60 ms
32,420 KB
testcase_02 AC 60 ms
32,420 KB
testcase_03 AC 59 ms
32,420 KB
testcase_04 AC 59 ms
32,420 KB
testcase_05 AC 60 ms
32,420 KB
testcase_06 AC 59 ms
32,420 KB
testcase_07 AC 59 ms
32,420 KB
testcase_08 AC 58 ms
32,420 KB
testcase_09 AC 58 ms
32,420 KB
testcase_10 AC 59 ms
32,420 KB
testcase_11 AC 60 ms
32,420 KB
testcase_12 AC 58 ms
32,420 KB
testcase_13 AC 59 ms
32,420 KB
testcase_14 AC 60 ms
32,420 KB
testcase_15 AC 59 ms
179,380 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (105 ms)。
MSBuild のバージョン 17.7.3+8ec440e68 (.NET)
  main -> /home/judge/data/code/bin/Release/net7.0/main.dll
  main -> /home/judge/data/code/bin/Release/net7.0/publish/

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;

class Program
{
    static void Main()
    {
        string N = Console.ReadLine();
        int n = int.Parse(N);
        
        List<string> data = new List<string>();
        
        for(int a=1;a<=2;a++){
            string S1 = "N";
                        
            if(a == 2){
                S1 += S1;
            }
            for(int b=1;b<=2;b++){
                string S2 = S1 + "U";
                if(b == 2){
                    S2 += S2;
                }
                
                for(int c=1;c<=2;c++){
                    string S3 = S2 + "P";
                    if(c == 2){
                        S3 += S3;
                    }
                    for(int d=1;d<=2;d++){
                        string S4 = S3 + "C";
                        if(d == 2){
                            S4 += S4;
                        }
                        
                        // 現在の文字列を追加する
                        data.Add(S4);
                        
                        
                        
                    }
                }
            }
        }
        
        // ソート
        data.Sort();
        
        Console.WriteLine(data[n-1]);
    }
}
0