QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#412850#6749. TargetXiaoretaWWA 0ms3736kbC++20493b2024-05-16 20:20:542024-05-16 20:20:54

Judging History

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

  • [2024-05-16 20:20:54]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3736kb
  • [2024-05-16 20:20:54]
  • 提交

answer

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

const double eps = 1e-4 - 1e-6;
int main() {
    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
    double a, b; cin >> a >> b;
    string ans = "";
    for (int i = 0; i < 50; i++) {
        if (b - 1 >= 0) {
            b -= 1;
            cout << 2;
        } else cout << 1;
        b *= 2;
    }
    reverse(ans.begin(), ans.end());
    cout << ans << '\n';
    
    
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

0.5 0.25

output:

11211111111111111111111111111111111111111111111111

result:

wrong answer wa