結果

問題 No.632 穴埋め門松列
ユーザー michonz4
提出日時 2019-11-05 13:03:37
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 237 bytes
コンパイル時間 111 ms
コンパイル使用メモリ 22,272 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-15 00:01:16
合計ジャッジ時間 594 ms
ジャッジサーバーID
(参考情報)
judge5 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:5:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |   scanf("%c %c %c", &a, &b, &c);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main() {
  char a, b, c;
  scanf("%c %c %c", &a, &b, &c);
  if (a=='?') {
    printf("%d\n", b>c ? 1: 4);
  } else if (b=='?') {
    printf("%d\n", 14);
  } else {
    printf("%d\n", a>b ? 4: 1);
  }
  return 0;
}
0