結果

問題 No.201 yukicoderじゃんけん
ユーザー umashikaumashika
提出日時 2016-02-01 19:23:39
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 326 bytes
コンパイル時間 177 ms
コンパイル使用メモリ 20,340 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-21 18:29:22
合計ジャッジ時間 1,573 ms
ジャッジサーバーID
(参考情報)
judge11 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
4,348 KB
testcase_01 WA -
testcase_02 AC 0 ms
4,348 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 0 ms
4,348 KB
testcase_11 AC 0 ms
4,348 KB
testcase_12 AC 1 ms
4,348 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 1 ms
4,348 KB
testcase_19 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:9:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |   scanf("%s %llu %c",s1,&p1,&x1);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:10:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   10 |   scanf("%s %llu %c",s2,&p2,&x2);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>
int main(void)
{
  char s1[101];
  char s2[101];
  unsigned long long int p1,p2;
  char x1,x2;

  scanf("%s %llu %c",s1,&p1,&x1);
  scanf("%s %llu %c",s2,&p2,&x2);

  if(p1>p2){
    printf("%s\n",s1);
  }
  else if(p1<p2){
    printf("%s\n",s2);
  }
  else{
    printf("-1\n");
  }
  return 0;
}












0