Submission #8897605
Source Code Expand
#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define VSORT(v) sort(v.begin(), v.end())
#define VRSORT(v) sort(v.rbegin(), v.rend())
#define ll long long
using namespace std;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
typedef pair<int, P> PP;
typedef pair<ll, LP> LPP;
//typedef vector<unsigned int>vec;
typedef vector<ll>vec;
typedef vector<vec> mat;
typedef vector<vector<int>> Graph;
//const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
//const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
const int INF = 1000000000;
const ll LINF = 1000000000000000000;//1e18
const ll MOD = 1000000007;
//const ll MOD = 998244353;
const double PI = acos(-1.0);
const double EPS = 1e-10;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline void add(T &a, T b){a = ((a+b) % MOD + MOD) % MOD;};
bool is_prime(int n){
for(int i = 2;i * i <=n;i++){
if(n % i == 0) return false;
}
return n != 1; //1の場合は例外
}
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
if(is_prime(n*(n-1)/2)) cout << "WANWAN" << endl;
else cout << "BOWBOW" << endl;
}
Submission Info
Submission Time |
|
Task |
A - ホリドッグ |
User |
Bondo416 |
Language |
C++14 (GCC 5.4.1) |
Score |
0 |
Code Size |
1340 Byte |
Status |
WA |
Exec Time |
1 ms |
Memory |
256 KB |
Judge Result
Set Name |
Sample |
All |
Score / Max Score |
0 / 0 |
0 / 100 |
Status |
|
|
Set Name |
Test Cases |
Sample |
subtask0_sample_01.txt, subtask0_sample_02.txt, subtask0_sample_03.txt, subtask0_sample_04.txt |
All |
subtask0_sample_01.txt, subtask0_sample_02.txt, subtask0_sample_03.txt, subtask0_sample_04.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt |
Case Name |
Status |
Exec Time |
Memory |
subtask0_sample_01.txt |
WA |
1 ms |
256 KB |
subtask0_sample_02.txt |
WA |
1 ms |
256 KB |
subtask0_sample_03.txt |
WA |
1 ms |
256 KB |
subtask0_sample_04.txt |
WA |
1 ms |
256 KB |
subtask1_01.txt |
WA |
1 ms |
256 KB |
subtask1_02.txt |
WA |
1 ms |
256 KB |
subtask1_03.txt |
WA |
1 ms |
256 KB |
subtask1_04.txt |
WA |
1 ms |
256 KB |
subtask1_05.txt |
WA |
1 ms |
256 KB |
subtask1_06.txt |
WA |
1 ms |
256 KB |
subtask1_07.txt |
WA |
1 ms |
256 KB |
subtask1_08.txt |
WA |
1 ms |
256 KB |
subtask1_09.txt |
WA |
1 ms |
256 KB |
subtask1_10.txt |
WA |
1 ms |
256 KB |
subtask1_11.txt |
WA |
1 ms |
256 KB |
subtask1_12.txt |
WA |
1 ms |
256 KB |