QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#412844#6749. TargetXiaoretaWWA 1ms3572kbC++20495b2024-05-16 20:16:582024-05-16 20:17:00

Judging History

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

  • [2024-05-16 20:17:00]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3572kb
  • [2024-05-16 20:16:58]
  • 提交

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;
            ans += '2';
        } else ans += '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: 1ms
memory: 3572kb

input:

0.5 0.25

output:

11111111111111111111111111111111111111111111111211

result:

wrong answer wa