結果

問題 No.201 yukicoderじゃんけん
ユーザー kentahama
提出日時 2015-05-03 23:45:53
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 280 bytes
コンパイル時間 178 ms
コンパイル使用メモリ 20,096 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-05 17:32:59
合計ジャッジ時間 879 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17 WA * 3
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:13:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   13 |   scanf("%s %s %*s %s %s %*s", SA, PA, SB, PB);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

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

char SA[101];
char SB[101];

char PA[10001];
char PB[10001];

int main(void) {
  int order;

  scanf("%s %s %*s %s %s %*s", SA, PA, SB, PB);
  order = strcmp(PA, PB);
  printf("%s\n", order > 0 ? SA : order < 0 ? SB : "-1");

  return 0;
}
0