結果
| 問題 | No.2749 随伴関手入門 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-10 22:01:50 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 322 bytes |
| 記録 | |
| コンパイル時間 | 1,156 ms |
| コンパイル使用メモリ | 208,440 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-07-04 17:18:01 |
| 合計ジャッジ時間 | 2,265 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
constexpr int MOD=998244353;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N;
cin>>N;
int f0=0,f1=1;
for(int i=1;i<=N*N;i++){
if(f1%N==0){
cout<<i<<'\n';
return 0;
}
f1=(f1+f0)%N;
f0=(f1-f0)%N;
}
}