結果
問題 | No.3019 YNeos |
ユーザー |
![]() |
提出日時 | 2025-02-20 02:54:09 |
言語 | C# (.NET 8.0.404) |
結果 |
AC
|
実行時間 | 49 ms / 1,000 ms |
コード長 | 1,071 bytes |
コンパイル時間 | 10,716 ms |
コンパイル使用メモリ | 175,992 KB |
実行使用メモリ | 186,452 KB |
最終ジャッジ日時 | 2025-02-20 02:54:31 |
合計ジャッジ時間 | 14,729 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 41 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (101 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System; public class Program { static void Main() { string X = Console.ReadLine(); string Y = Console.ReadLine(); string S = "?"; int xl = X.Length; int yl = Y.Length; int arrayIndex; // 二つの文字数の差分を抽出 int xylen = Math.Abs(xl-yl); // 交互に文字列を作成できるか判定 if(xylen < 2) { // 奇数指定されているXの文字数がYの文字数以上か判定 if(xl >= yl) { // 規定の条件を満たすので出力文字列作成 S = ""; arrayIndex = 0; while(true) { if(arrayIndex < xl) S += X[arrayIndex]; if(arrayIndex < yl) S += Y[arrayIndex]; arrayIndex++; if(arrayIndex >= xl && arrayIndex >= yl) break; } } } Console.WriteLine(S); } }