結果
| 問題 |
No.2749 随伴関手入門
|
| コンテスト | |
| ユーザー |
tour2st
|
| 提出日時 | 2024-05-10 22:00:37 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 640 bytes |
| コンパイル時間 | 1,098 ms |
| コンパイル使用メモリ | 106,216 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-20 05:30:06 |
| 合計ジャッジ時間 | 2,417 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <random>
#include <iomanip>
#include <time.h>
#include <bitset>
#include <map>
#include <numeric>
#include <atcoder/modint>
#include <atcoder/dsu>
using namespace atcoder;
using namespace std;
using mint = modint998244353;
#define ll long long
#define pll pair<ll,ll>
ll loop(ll before, ll now, ll idx, ll mod)
{
if(now==0) return idx;
else return loop(now, (before+now)%mod, idx+1, mod);
}
ll n;
int main()
{
cin >> n;
if(n==1) cout << 1 << endl;
else cout << loop(1,1,2,n) << endl;
}
tour2st