結果
| 問題 | No.415 ぴょん |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-05-31 22:10:34 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 335 bytes |
| 記録 | |
| コンパイル時間 | 635 ms |
| コンパイル使用メモリ | 79,824 KB |
| 実行使用メモリ | 494,964 KB |
| 最終ジャッジ日時 | 2026-03-20 04:23:41 |
| 合計ジャッジ時間 | 9,496 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 RE * 2 TLE * 3 |
ソースコード
#include <iostream>
#include <vector>
using namespace std;
int main(int argc, char* argv[])
{
int N,D;
cin>>N>>D;
vector<bool> flag(N+1,false);
int aw=0;
int i=1;
flag[1]=true;
while (i<N){
i+=D;
if (i>=N){
i=i-N;
}
if (!flag[i]){
flag[i]=true;
aw++;
}else{
cout<<aw<<endl;
return 0;
}
}
return 0;
}