結果
問題 | No.1732 ~サンプルはちゃんと見て!~ 16進数と8進数(2) |
ユーザー | 👑 kakel-san |
提出日時 | 2021-11-05 23:28:10 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 67 ms / 2,000 ms |
コード長 | 876 bytes |
コンパイル時間 | 1,076 ms |
コンパイル使用メモリ | 67,968 KB |
実行使用メモリ | 21,720 KB |
最終ジャッジ日時 | 2023-08-06 11:34:00 |
合計ジャッジ時間 | 2,216 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 65 ms
21,720 KB |
testcase_01 | AC | 63 ms
21,588 KB |
testcase_02 | AC | 65 ms
21,644 KB |
testcase_03 | AC | 67 ms
21,692 KB |
ソースコード
using System; using System.Collections.Generic; using static System.Console; using System.Linq; class yuki321 { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); static void Main() { var t = NN; var str = "CCCFACCFAACCCCBACCCBA"; var list = new List<int>(new[] { 0, 5, 10 }); var reslist = new List<string>(); for (var i = 0; i < t; ++i) { var n = NN; if (!list.Contains(n % 21)) { reslist.Add("-1"); continue; } var res = string.Concat(Enumerable.Repeat(str, (n + 20) / 21)).Take(n).ToList(); res.Reverse(); reslist.Add(string.Concat(res)); } WriteLine(string.Join("\n", reslist)); } }