Submission #27080341


Source Code Expand

#include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <string>
#include <tuple>
#include <vector>
using namespace std;

#define rep(i, o) for (int i = 0; i < (o); ++i)
#define REP(i, a, b) for (int i = (int)(a); (i) < (int)(b); i++)
#define NUM 1e5

typedef long long ll;
typedef unsigned long long ull;

ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll c, ll d) { return c / gcd(c, d) * d; }

const int MOD = 1000000007;

template <class T>
bool chmax(T &a, const T &b)
{
    if (a < b)
    {
        a = b;
        return 1;
    }
    return 0;
}

template <class T>
bool chmin(T &a, const T &b)
{
    if (a > b)
    {
        a = b;
        return 1;
    }
    return 0;
}


int main() {
    double x;
    cin >> x;

    int n = round(x);
    cout << n << endl;
    return 0;
}

Submission Info

Submission Time
Task A - Round decimals
User m_clove
Language C++ (GCC 9.2.1)
Score 100
Code Size 936 Byte
Status AC
Exec Time 5 ms
Memory 3784 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 12
Set Name Test Cases
Sample example_00.txt, example_01.txt, example_02.txt
All example_00.txt, example_01.txt, example_02.txt, test_00.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt
Case Name Status Exec Time Memory
example_00.txt AC 5 ms 3608 KiB
example_01.txt AC 2 ms 3592 KiB
example_02.txt AC 2 ms 3640 KiB
test_00.txt AC 4 ms 3628 KiB
test_01.txt AC 3 ms 3592 KiB
test_02.txt AC 2 ms 3784 KiB
test_03.txt AC 2 ms 3648 KiB
test_04.txt AC 2 ms 3568 KiB
test_05.txt AC 2 ms 3628 KiB
test_06.txt AC 2 ms 3624 KiB
test_07.txt AC 2 ms 3556 KiB
test_08.txt AC 2 ms 3624 KiB