結果
| 問題 | No.415 ぴょん |
| コンテスト | |
| ユーザー |
wowilson
|
| 提出日時 | 2016-11-05 12:48:30 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 728 bytes |
| 記録 | |
| コンパイル時間 | 885 ms |
| コンパイル使用メモリ | 103,808 KB |
| 実行使用メモリ | 799,104 KB |
| 最終ジャッジ日時 | 2026-05-19 11:00:56 |
| 合計ジャッジ時間 | 7,952 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 TLE * 2 MLE * 1 -- * 21 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
namespace Yukicoder
{
public class Program
{
public static void Main()
{
var line = Console.ReadLine().Split();
int n = int.Parse(line[0]);
int d = int.Parse(line[1]);
int[] circle = new int[n];
int cur = 0;
int cnt = 0;
circle[0] = -1;
while (true)
{
cur += d;
cur %= n;
if (circle[cur] == 0)
{
cnt++;
circle[cur] = -1;
}else
{
break;
}
}
Console.WriteLine(cnt);
}
}
}
wowilson