Submission #36969766


Source Code Expand

#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;
		}
	}
}

Submission Info

Submission Time
Task C - Extra Character
User Cebu
Language C (GCC 9.2.1)
Score 300
Code Size 248 Byte
Status AC
Exec Time 9 ms
Memory 2632 KiB

Compile Error

./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);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 27
Set Name Test Cases
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
Case Name Status Exec Time Memory
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