結果

問題 No.2784 繰り上がりなし十進和
ユーザー haihamabossu
提出日時 2024-06-14 23:02:37
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 771 bytes
コンパイル時間 2,424 ms
コンパイル使用メモリ 197,692 KB
最終ジャッジ日時 2025-02-21 22:23:09
ジャッジサーバーID
(参考情報)
judge4 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17 WA * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

void solve() {
  vector a(6, vector<ll>(6));
  rep(i, 6) {
    string s;
    cin >> s;
    rep(j, 6) a[i][j] = s[j] - '0';
  }
  ll ans = 1;
  rep(j, 6) {
    bool ok = false, ff = false, ef = false;
    rep(i, 6) {
      ok |= a[i][j] != 5 && a[i][j] % 2 == 1;
      ff |= a[i][j] == 5;
      ef |= a[i][j] != 0 && a[i][j] % 2 == 0;
    }
    if (ok || (ff && ef)) {
      ans *= 10;
    } else if (ff) {
      ans *= 2;
    } else if (ef) {
      ans *= 5;
    }
  }
  cout << ans << '\n';
}

int main() {
  std::cin.tie(nullptr);
  std::ios_base::sync_with_stdio(false);
  int T = 1;
  for (int t = 0; t < T; t++) {
    solve();
  }
  return 0;
}
0