提出 #36969766


ソースコード 拡げる

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

int main(void){
	char str1[500001], str2[500001];
	scanf("%s %s", str1, str2);

	int flag = 1;
	for(int i = 0; flag; i++){
		if(str2[i] != str1[i]){
			printf("%d\n", i+1);
			flag = 0;
		}
	}
}

提出情報

提出日時
問題 C - Extra Character
ユーザ Cebu
言語 C (GCC 9.2.1)
得点 300
コード長 248 Byte
結果 AC
実行時間 9 ms
メモリ 2632 KiB

コンパイルエラー

./Main.c: In function ‘main’:
./Main.c:6:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
    6 |  scanf("%s %s", str1, str2);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 300 / 300
結果
AC × 3
AC × 27
セット名 テストケース
Sample sample_01.txt, sample_02.txt, sample_03.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt, random_20.txt, random_21.txt, random_22.txt, random_23.txt, random_24.txt, sample_01.txt, sample_02.txt, sample_03.txt
ケース名 結果 実行時間 メモリ
random_01.txt AC 8 ms 2616 KiB
random_02.txt AC 5 ms 1900 KiB
random_03.txt AC 5 ms 2584 KiB
random_04.txt AC 6 ms 1824 KiB
random_05.txt AC 9 ms 2624 KiB
random_06.txt AC 9 ms 2468 KiB
random_07.txt AC 8 ms 2632 KiB
random_08.txt AC 8 ms 1788 KiB
random_09.txt AC 8 ms 2584 KiB
random_10.txt AC 8 ms 2504 KiB
random_11.txt AC 7 ms 2576 KiB
random_12.txt AC 3 ms 1928 KiB
random_13.txt AC 8 ms 2628 KiB
random_14.txt AC 6 ms 2628 KiB
random_15.txt AC 3 ms 1732 KiB
random_16.txt AC 1 ms 1616 KiB
random_17.txt AC 7 ms 2616 KiB
random_18.txt AC 6 ms 2628 KiB
random_19.txt AC 9 ms 2584 KiB
random_20.txt AC 8 ms 2628 KiB
random_21.txt AC 3 ms 2580 KiB
random_22.txt AC 7 ms 2584 KiB
random_23.txt AC 7 ms 2612 KiB
random_24.txt AC 8 ms 2628 KiB
sample_01.txt AC 2 ms 1664 KiB
sample_02.txt AC 1 ms 1736 KiB
sample_03.txt AC 1 ms 1608 KiB