/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 532.0 KiB
#2 Accepted 1ms 492.0 KiB
#3 Accepted 1ms 520.0 KiB
#4 Accepted 1ms 532.0 KiB
#5 Accepted 1ms 532.0 KiB
#6 Accepted 1ms 520.0 KiB
#7 Accepted 1ms 532.0 KiB

Code


#include <vector>
#include <iostream>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int t = n % 2 == 0;
  int f = n % 5 == 0;
  if (t && f) {
    cout << 1 << '\n';
  } else if (f) {
    cout << 2 << '\n';
  } else if (t) {
    cout << 5 << '\n';
  } else {
    cout << 10 << '\n';
  }
  return 0;
}

Information

Submit By
Type
Submission
Problem
P1012 Zéros de fin
Language
C++20 (G++ 13.2.0)
Submit At
2024-05-06 21:39:08
Judged At
2024-11-11 03:31:25
Judged By
Score
100
Total Time
2ms
Peak Memory
532.0 KiB