結果

問題 No.201 yukicoderじゃんけん
ユーザー umashika
提出日時 2016-02-01 19:23:39
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 326 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 19,968 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-21 19:49:56
合計ジャッジ時間 989 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6 WA * 14
権限があれば一括ダウンロードができます
コンパイルメッセージ
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