結果
| 問題 |
No.1003 サイコロの実装 (1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-03-26 10:12:38 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 400 bytes |
| コンパイル時間 | 1,623 ms |
| コンパイル使用メモリ | 171,420 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-27 21:35:27 |
| 合計ジャッジ時間 | 2,507 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using P = pair<int, int>;
const int INF = 1000000001;
int main(void)
{
int n;
cin >> n;
set<int> s;
rep(i, n) s.insert(i % 6 + 1);
if (s.size() < 6)
cout << "No";
else if (n % s.size() == 0)
cout << "Yes";
else
cout << "No";
cout << '\n';
return 0;
}