QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#73105#2908. Double Passwordqdd#AC ✓3ms3468kbC++20763b2023-01-22 11:04:502023-01-22 11:04:52

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-01-22 11:04:52]
  • 评测
  • 测评结果:AC
  • 用时:3ms
  • 内存:3468kb
  • [2023-01-22 11:04:50]
  • 提交

answer

// qdd on Jan 21, 2023

#ifdef qdd
#include <ringo>
#else
#include <bits/stdc++.h>
#define dbg(...)
#define dbgr(x, y)
#endif

using namespace std;

using ll = long long;

#define ALL(x) begin(x), end(x)

template <class T>
istream& operator>>(istream& is, vector<T>& v) {
  for (T& x : v) is >> x;
  return is;
}

template <class T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  bool f = 0;
  for (const T& x : v) (f ? os << ' ' : os) << x, f = 1;
  return os;
}

void sol() {
  string s, t;
  cin >> s >> t;
  int ans = 1;
  for (int i = 0; i < 4; i++) {
    ans *= (s[i] == t[i] ? 1 : 2);
  }
  cout << ans << '\n';
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  sol();
  return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 3368kb

input:

1111
1234

output:

8

result:

ok single line: '8'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3440kb

input:

0000
9999

output:

16

result:

ok single line: '16'

Test #3:

score: 0
Accepted
time: 2ms
memory: 3384kb

input:

3214
3224

output:

2

result:

ok single line: '2'

Test #4:

score: 0
Accepted
time: 2ms
memory: 3440kb

input:

2718
2718

output:

1

result:

ok single line: '1'

Test #5:

score: 0
Accepted
time: 2ms
memory: 3376kb

input:

9920
2484

output:

16

result:

ok single line: '16'

Test #6:

score: 0
Accepted
time: 2ms
memory: 3396kb

input:

4803
5218

output:

16

result:

ok single line: '16'

Test #7:

score: 0
Accepted
time: 2ms
memory: 3336kb

input:

1422
7464

output:

8

result:

ok single line: '8'

Test #8:

score: 0
Accepted
time: 2ms
memory: 3440kb

input:

0845
0827

output:

4

result:

ok single line: '4'

Test #9:

score: 0
Accepted
time: 2ms
memory: 3468kb

input:

3110
2891

output:

16

result:

ok single line: '16'

Test #10:

score: 0
Accepted
time: 3ms
memory: 3392kb

input:

9000
7572

output:

16

result:

ok single line: '16'

Test #11:

score: 0
Accepted
time: 0ms
memory: 3468kb

input:

2121
6130

output:

8

result:

ok single line: '8'

Test #12:

score: 0
Accepted
time: 2ms
memory: 3392kb

input:

0906
5762

output:

16

result:

ok single line: '16'

Test #13:

score: 0
Accepted
time: 0ms
memory: 3392kb

input:

4099
9724

output:

16

result:

ok single line: '16'

Test #14:

score: 0
Accepted
time: 1ms
memory: 3364kb

input:

8851
1368

output:

16

result:

ok single line: '16'

Test #15:

score: 0
Accepted
time: 2ms
memory: 3336kb

input:

7907
0614

output:

16

result:

ok single line: '16'