結果
| 問題 |
No.415 ぴょん
|
| ユーザー |
|
| 提出日時 | 2018-05-31 22:12:49 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 354 bytes |
| コンパイル時間 | 628 ms |
| コンパイル使用メモリ | 69,816 KB |
| 実行使用メモリ | 33,396 KB |
| 最終ジャッジ日時 | 2024-06-30 08:43:31 |
| 合計ジャッジ時間 | 3,724 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 TLE * 1 -- * 21 |
ソースコード
#include <iostream>
#include <vector>
using namespace std;
typedef long long LL;
int main(int argc, char* argv[])
{
LL N,D;
cin>>N>>D;
vector<bool> flag(N+1,false);
LL aw=0;
LL 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;
}