QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#474878#6749. TargetSinhoMoemeWA 0ms1508kbC++23269b2024-07-13 08:54:562024-07-13 08:54:56

Judging History

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

  • [2024-07-13 08:54:56]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:1508kb
  • [2024-07-13 08:54:56]
  • 提交

answer

#include<cstdio>
constexpr int MAX=50;
double b;
bool ans[MAX+1];
int main(){
	scanf("%*lf%lf",&b);
	for(int i=0;i<=MAX;++i){
		b*=2;
		if(b>=1){
			ans[i]=1;
			--b;
		}
		else ans[i]=0;
	}
	for(int i=MAX;i>=0;--i) putchar(ans[i]?'2':'1');
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 1508kb

input:

0.5 0.25

output:

111111111111111111111111111111111111111111111111121

result:

wrong answer wa