Submission #32204666
Source Code Expand
#include "bits/stdc++.h"
using namespace std;
using ll = long long;
const int MOD = 1e9 + 7;
void printArr(vector<int>arr){
for(auto i : arr){
cout << i << " ";
}
cout << endl;
}
void printArrPair(vector<pair<int,int>>arr){
for(auto i : arr){
cout << i.first << " " << i.second << " ";
}
cout << endl;
}
void solve(){
int n;
cin >> n;
int ans = 0;
ans += n % 10;
n /= 10;
ans += (n % 10) * 10;
if(ans < 10){
cout << ("0" + to_string(ans)) << endl;
return;
}
cout << ans << endl;
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
#ifndef ONLINE_JUDGE
freopen("data", "r", stdin);
#endif
int n = 1;
// cin >> n;
while(n--)
solve();
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Last Two Digits |
| User | liuji |
| Language | C++ (GCC 9.2.1) |
| Score | 100 |
| Code Size | 843 Byte |
| Status | AC |
| Exec Time | 7 ms |
| Memory | 3668 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example_00.txt, example_01.txt |
| All | example_00.txt, example_01.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 | 7 ms | 3532 KiB |
| example_01.txt | AC | 2 ms | 3616 KiB |
| test_00.txt | AC | 2 ms | 3480 KiB |
| test_01.txt | AC | 2 ms | 3500 KiB |
| test_02.txt | AC | 2 ms | 3532 KiB |
| test_03.txt | AC | 3 ms | 3520 KiB |
| test_04.txt | AC | 2 ms | 3528 KiB |
| test_05.txt | AC | 2 ms | 3532 KiB |
| test_06.txt | AC | 2 ms | 3660 KiB |
| test_07.txt | AC | 2 ms | 3668 KiB |
| test_08.txt | AC | 4 ms | 3584 KiB |