結果

問題 No.547 未知の言語
ユーザー gunmakengunmaken
提出日時 2017-10-21 16:02:58
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 532 bytes
コンパイル時間 153 ms
コンパイル使用メモリ 28,488 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-09-08 09:48:44
合計ジャッジ時間 1,448 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 0 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 0 ms
4,376 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 1 ms
4,380 KB
testcase_09 WA -
testcase_10 AC 1 ms
4,380 KB
testcase_11 WA -
testcase_12 AC 0 ms
4,376 KB
testcase_13 AC 0 ms
4,380 KB
testcase_14 AC 0 ms
4,376 KB
testcase_15 AC 0 ms
4,376 KB
testcase_16 AC 0 ms
4,380 KB
testcase_17 AC 0 ms
4,380 KB
testcase_18 WA -
testcase_19 AC 0 ms
4,380 KB
testcase_20 AC 1 ms
4,380 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 0 ms
4,376 KB
testcase_24 AC 1 ms
4,376 KB
testcase_25 AC 0 ms
4,376 KB
testcase_26 AC 1 ms
4,384 KB
testcase_27 WA -
testcase_28 AC 0 ms
4,384 KB
testcase_29 AC 1 ms
4,376 KB
testcase_30 AC 0 ms
4,376 KB
testcase_31 AC 1 ms
4,380 KB
testcase_32 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <string.h>
#include <stdio.h>

int main(void)
{
    int N,j,i;
    scanf("%d",&N);
    char a[N][20],b[N][20];
    for (i = 0; i < N; i++) {
        scanf("%s",a[i]);
    }
    for (i = 0; i < N; i++) {
        scanf("%s",b[i]);
    }
    for (i = 0; i < N; i++) {
        for (j = 0; j < strlen(a[0]); j++) {
            if (a[i][j] != b[i][j]) {
                break;
            }
        }
        if (a[i][j] != b[i][j]) {
            break;
        }
    }
    printf("%d\n%s\n%s\n",i + 1,a[i],b[i]);
    return 0;
}
0