Submission #14494969
Source Code Expand
#include <bits/stdc++.h>
#define endl '\n'
#define SZ(x) ((int)x.size())
#define ALL(V) V.begin(), V.end()
#define L_B lower_bound
#define U_B upper_bound
#define pb push_back
using namespace std;
template<class T, class T1> int chkmin(T &x, const T1 &y) { return x > y ? x = y, 1 : 0; }
template<class T, class T1> int chkmax(T &x, const T1 &y) { return x < y ? x = y, 1 : 0; }
const int MAXN = (1 << 20);
int x;
void read() {
cin >> x;
}
int gcd(int x, int y) {
while(x) {
int r = y % x;
y = x;
x = r;
}
return y;
}
void solve() {
int p = x * 360 / gcd(x, 360);
cout << p / x << endl;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
read();
solve();
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Takahashikun, The Strider |
| User | radoslav11 |
| Language | C++ (GCC 9.2.1) |
| Score | 200 |
| Code Size | 751 Byte |
| Status | AC |
| Exec Time | 8 ms |
| Memory | 3648 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | s1.txt, s2.txt |
| All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, s1.txt, s2.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 01.txt | AC | 8 ms | 3648 KiB |
| 02.txt | AC | 3 ms | 3536 KiB |
| 03.txt | AC | 2 ms | 3580 KiB |
| 04.txt | AC | 2 ms | 3636 KiB |
| 05.txt | AC | 2 ms | 3540 KiB |
| 06.txt | AC | 2 ms | 3536 KiB |
| 07.txt | AC | 2 ms | 3612 KiB |
| 08.txt | AC | 2 ms | 3516 KiB |
| 09.txt | AC | 4 ms | 3608 KiB |
| s1.txt | AC | 2 ms | 3532 KiB |
| s2.txt | AC | 2 ms | 3636 KiB |