/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 536.0 KiB
#2 Accepted 1ms 540.0 KiB
#3 Accepted 1ms 540.0 KiB
#4 Accepted 1ms 488.0 KiB
#5 Accepted 1ms 488.0 KiB
#6 Accepted 1ms 488.0 KiB
#7 Accepted 1ms 504.0 KiB

Code

#include <bits/stdc++.h>
#define ll long long
#define F first
#define S second
#define endl '\n'
#define Endl '\n'

using namespace std;

const int N = 2e5 + 5;
int tc, n, m, a[N];

random_device rd;
mt19937 eng(rd());

int getRandomNumberInRange(int min, int max) {
    uniform_int_distribution<> distribution(min, max);
    return distribution(eng);
}

int getAnswer(int n) {
    if (n % 10 == 0) {
        return 1;
    } else if (n % 10 == 2) {
        return 5;
    } else if (n % 10 == 5) {
        return 2;
    } else {
        return 10;
    }
}

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0); // cout.tie(0);
    cin >> n;
    cout << getAnswer(n) << endl;

    return 0;
}

Information

Submit By
Type
Submission
Problem
P1012 Zéros de fin
Language
C++17 (G++ 13.2.0)
Submit At
2023-12-03 16:34:42
Judged At
2023-12-03 16:54:29
Judged By
Score
70
Total Time
2ms
Peak Memory
540.0 KiB