結果

問題 No.201 yukicoderじゃんけん
ユーザー suppy193
提出日時 2015-06-03 10:45:28
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 272 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 20,096 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-06 13:52:49
合計ジャッジ時間 699 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6 WA * 14
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |         scanf("%s%lld%s", Sa, &Pa, Xa);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |         scanf("%s%lld%s", Sb, &Pb, Xb);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(void) {
	char Sa[101], Sb[101], Xa[2], Xb[2];
	long long int Pa, Pb;
	scanf("%s%lld%s", Sa, &Pa, Xa);
	scanf("%s%lld%s", Sb, &Pb, Xb);
	if(Pa > Pb)printf("%s\n", Sa);
	else if(Pa < Pb)printf("%s\n", Sb);
	else printf("-1\n");

    return 0;
}
0