結果
| 問題 |
No.415 ぴょん
|
| ユーザー |
taba
|
| 提出日時 | 2017-05-18 22:09:04 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 476 bytes |
| コンパイル時間 | 962 ms |
| コンパイル使用メモリ | 109,272 KB |
| 実行使用メモリ | 32,640 KB |
| 最終ジャッジ日時 | 2024-09-18 19:13:38 |
| 合計ジャッジ時間 | 3,440 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 1 TLE * 1 -- * 23 |
ソースコード
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cassert>
#include <random>
#include <vector>
#include <algorithm>
#include <array>
#include <functional>
#include <utility>
#include <regex>
#include <tuple>
#include <map>
using namespace std;
int main(){
int n,d;
-scanf("%d%d",&n,&d);
vector<bool> a(n,true);
int c=0,p=0;
while(a[(p+d)%n]){
//printf("%d to %d %d\n",p,(p+d)%n,c);
a[p]=false;
p+=d;
p%=n;
c++;
}
printf("%d\n",c);
return 0;
}
taba