結果

問題 No.293 4>7の世界
ユーザー takatowintakatowin
提出日時 2017-01-09 15:11:20
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 461 bytes
コンパイル時間 121 ms
コンパイル使用メモリ 20,864 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-05-10 03:27:08
合計ジャッジ時間 1,162 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<stdio.h>
#include<string.h>
int main(void){
  char s[11],t[11];
  int num,i;
  scanf("%s %s",s,t);
  if(strlen(s)>strlen(t))
    puts(s);
  else if(strlen(t)>strlen(s))
    puts(t);
  else{
    for(i=0;i<strlen(s);i++){
      if(s[i]>t[i]){
        if(!(s[i]=='7' && t[i]=='4')){
          puts(s);
          goto end;
        }
        else{
          puts(t);
          goto end;
        }
      }
    }
  }
  puts(t);
  end:
  num=1;
  return 0;
}

0