結果
問題 | No.3019 YNeos |
ユーザー |
![]() |
提出日時 | 2025-02-14 21:25:19 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 396 bytes |
コンパイル時間 | 296 ms |
コンパイル使用メモリ | 25,472 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-02-14 21:25:22 |
合計ジャッジ時間 | 1,823 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 41 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%s%s", x, y); | ^~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>int main(){char x[102], y[102];scanf("%s%s", x, y);int i;int n, m;for (n = 0; x[n] != '\0'; n++);for (m = 0; y[m] != '\0'; m++);if (n == m){for (i = 0; i < n; i++)printf("%c%c", x[i], y[i]);printf("\n");}else if (n == m + 1){for (i = 0; i < m; i++)printf("%c%c", x[i], y[i]);printf("%c\n", x[i]);}elseprintf("?\n");return 0;}