結果

問題 No.3019 YNeos
ユーザー tnakao0123
提出日時 2025-02-15 16:43:16
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 553 bytes
コンパイル時間 210 ms
コンパイル使用メモリ 39,800 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2025-02-15 16:43:18
合計ジャッジ時間 1,286 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 41
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:27:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   27 |   scanf("%s%s", x, y);
      |   ~~~~~^~~~~~~~~~~~~~

ソースコード

diff #

/* -*- coding: utf-8 -*-
 *
 * 3019.cc:  No.3019 YNeos - yukicoder
 */

#include<cstdio>
#include<cstring>
#include<algorithm>

using namespace std;

/* constant */

const int MAX_N = 100;

/* typedef */

/* global variables */

char x[MAX_N + 4], y[MAX_N + 4];

/* subroutines */

/* main */

int main() {
  scanf("%s%s", x, y);
  int n = strlen(x), m = strlen(y);

  if (m <= n && n <= m + 1) {
    for (int i = 0; i < m; i++) putchar(x[i]), putchar(y[i]);
    if (m < n) putchar(x[n - 1]);
    putchar('\n');
  }
  else
    puts("?");

  return 0;
}
0