QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#270837#2920. Ultimate Binary WatchPetroTarnavskyi#WA 1ms3420kbC++20655b2023-12-01 16:16:542023-12-01 16:16:55

Judging History

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

  • [2023-12-01 16:16:55]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3420kb
  • [2023-12-01 16:16:54]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); i--)
#define SZ(a) int(a.size())
#define ALL(a) a.begin(), a.end()
#define PB push_back
#define MP make_pair
#define F first
#define S second

typedef long long LL;
typedef vector<int> VI;
typedef pair<int, int> PII;
typedef double db;

int main()
{
	ios::sync_with_stdio(0); 
	cin.tie(0);	
	string s;
	cin >> s;
	RFOR(i, 4, 0)
	{
		FOR(j, 0, 4)
		{
			cout << (((s[j] - '0') >> i) & 1 ? '*' : '.');
			if (j == 1)
				cout << ' ';
		}
		cout << "\n";
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3420kb

input:

1234

output:

.. ..
.. .*
.* *.
*. *.

result:

wrong answer 1st lines differ - expected: '. .   . .', found: '.. ..'