結果
| 問題 |
No.415 ぴょん
|
| ユーザー |
|
| 提出日時 | 2018-05-31 22:10:34 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 335 bytes |
| コンパイル時間 | 524 ms |
| コンパイル使用メモリ | 68,452 KB |
| 実行使用メモリ | 33,452 KB |
| 最終ジャッジ日時 | 2024-06-30 08:42:03 |
| 合計ジャッジ時間 | 3,912 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 TLE * 1 -- * 21 |
ソースコード
#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;
}