結果
| 問題 |
No.415 ぴょん
|
| ユーザー |
dnish
|
| 提出日時 | 2017-07-06 01:21:53 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 261 bytes |
| コンパイル時間 | 1,508 ms |
| コンパイル使用メモリ | 171,692 KB |
| 実行使用メモリ | 286,500 KB |
| 最終ジャッジ日時 | 2024-10-05 20:23:12 |
| 合計ジャッジ時間 | 3,952 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 TLE * 1 -- * 23 |
ソースコード
#include <bits/stdc++.h>
#define p(s) cout<<(s)<<endl
using namespace std;
int main(){
int N,D;
cin>>N>>D;
set<int> s;
s.insert(0);
int now=0;
int ans=0;
while(s.find((now+D)%N)==s.end()){
now+=D;
s.insert((now)%N);
ans++;
}
p(ans);
return 0;
}
dnish