提出 #283204


ソースコード 拡げる

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

提出情報

提出日時
問題 A - 高橋くんの研修
ユーザ ayutet
言語 C (GCC 4.4.7)
得点 100
コード長 299 Byte
結果 AC
実行時間 21 ms
メモリ 804 KiB

コンパイルエラー

./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

ジャッジ結果

セット名 All
得点 / 配点 100 / 100
結果
AC × 11
セット名 テストケース
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
ケース名 結果 実行時間 メモリ
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