結果

問題 No.201 yukicoderじゃんけん
ユーザー pengin_2000pengin_2000
提出日時 2020-02-22 16:01:40
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 541 bytes
コンパイル時間 107 ms
コンパイル使用メモリ 29,696 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-17 23:20:37
合計ジャッジ時間 831 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 1 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 1 ms
5,376 KB
testcase_14 AC 1 ms
5,376 KB
testcase_15 AC 1 ms
5,376 KB
testcase_16 AC 1 ms
5,376 KB
testcase_17 AC 1 ms
5,376 KB
testcase_18 AC 1 ms
5,376 KB
testcase_19 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>
#include<string.h>
int main()
{
	char s[2][102], p[2][10004], x[2][4];
	scanf("%s%s%s", s[0], p[0], x[0]);
	scanf("%s%s%s", s[1], p[1], x[1]);
	if (strlen(p[0]) > strlen(p[1]))
	{
		printf("%s\n", s[0]);
		return 0;
	}
	if (strlen(p[0]) < strlen(p[1]))
	{
		printf("%s\n", s[1]);
		return 0;
	}
	int i, n = strlen(p[0]);
	for (i = 0; i < n; i++)
	{
		if (p[0][i] > p[1][i])
		{
			printf("%s\n", s[0]);
			return 0;
		}
		if (p[0][i] < p[1][i])
		{
			printf("%s\n", s[1]);
			return 0;
		}
	}
	printf("-1\n");
	return 0;
}
0