結果
| 問題 | No.2551 2, 3, 5, 7 Game |
| コンテスト | |
| ユーザー |
heno239
|
| 提出日時 | 2024-02-06 18:12:40 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
AC
|
| 実行時間 | 416 ms / 2,357 ms |
| コード長 | 2,410 bytes |
| コンパイル時間 | 7,384 ms |
| コンパイル使用メモリ | 167,664 KB |
| 実行使用メモリ | 191,104 KB |
| 最終ジャッジ日時 | 2024-09-28 12:09:49 |
| 合計ジャッジ時間 | 11,393 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (95 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) /home/judge/data/code/Main.cs(26,13): warning CS0162: 到達できないコードが検出されました [/home/judge/data/code/main.csproj] main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System.Collections;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
internal class Program
{
private const long mod = 998244353;
private const long mod17 = 1000000007;
private const long INF = mod17 * mod17;
public static void Main(string[] args)
{
List<long> cs = new List<long>() { 2, 3, 5, 7 };
bool query(long x)
{
long t = 1;
while (true)
{
if (x < t) return true;
if (t <= x && x < 2 * t) return false;
t *= 14;
}
return true;
}
int t = int.Parse(Console.ReadLine());
for (int i = 0; i < t; i++)
{
long n = long.Parse(Console.ReadLine());
if (query(n-1))
{
Console.WriteLine("sepa");
}
else
{
Console.WriteLine("ryota");
}
}
/*const int mn = 400;
var iswin = mkar<bool>(mn, false);
iswin[0] = true;
for (int i = 1; i < mn; i++)
{
foreach (var c in cs)
{
if (!iswin[i / (int)c]) iswin[i] = true;
}
Console.WriteLine("{0},{1}",i,iswin[i]);
}*/
/*List<long> cs = new List<long>() { 2, 3, 5, 7 };
var nex = new SortedSet<long>();
List<long> ts = new List<long>();
nex.Add(1);
while (nex.Count > 0)
{
long val = nex.Min();
nex.Remove(val);
if (val > (long)20000000000000000) continue;
ts.Add(val);
foreach (var c in cs)
{
nex.Add(val * c);
}
}
var iswin = mkar<bool>(ts.Count,false);
for (int i = 0; i < ts.Count; i++)
{
}*/
}
public class lower_bound<T> : IComparer<T> where T : IComparable<T>
{
public int Compare(T x, T y)
{
return 0 <= x.CompareTo(y) ? 1 : -1;
}
}
public static List<T> mkar<T>(int n, T val)
{
List<T> res = new List<T>(n);
for(int i=0;i<n;i++)res.Add(val);
return res;
}
public static int[] getar()
{
var res = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
return res;
}
}
heno239