Submission #283204


Source Code Expand

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

int main(){
	int n;
	int a_len = 0, b_len = 0;

	char a[100], b[100];

	scanf("%s", a);
	scanf("%s", b);

	a_len = strlen(a);
	b_len = strlen(b);

	if(a_len < b_len){
		printf("%s\n", &b);
	} else {
		printf("%s\n", &a);
	}

	return 0;
}

Submission Info

Submission Time
Task A - 高橋くんの研修
User ayutet
Language C (GCC 4.4.7)
Score 100
Code Size 299 Byte
Status AC
Exec Time 21 ms
Memory 804 KiB

Compile Error

./Main.c: In function ‘main’:
./Main.c:17: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘char (*)[100]’
./Main.c:19: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘char (*)[100]’
./Main.c:10: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result
./Main.c:11: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 11
Set Name Test Cases
All test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt
Case Name Status Exec Time Memory
sample_01.txt AC 20 ms 800 KiB
sample_02.txt AC 19 ms 696 KiB
test_01.txt AC 19 ms 676 KiB
test_02.txt AC 19 ms 792 KiB
test_03.txt AC 20 ms 764 KiB
test_04.txt AC 21 ms 704 KiB
test_05.txt AC 20 ms 800 KiB
test_06.txt AC 20 ms 804 KiB
test_07.txt AC 20 ms 796 KiB
test_08.txt AC 20 ms 800 KiB
test_09.txt AC 21 ms 804 KiB
test_10.txt AC 19 ms 700 KiB
test_11.txt AC 20 ms 800 KiB