結果
| 問題 |
No.2973 シュニレルマン積分入門
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-11-29 23:04:12 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 873 bytes |
| コンパイル時間 | 6,262 ms |
| コンパイル使用メモリ | 312,060 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-29 23:04:22 |
| 合計ジャッジ時間 | 7,469 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 WA * 8 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using mint = atcoder::static_modint<998244353>;
//using mint = atcoder::static_modint<1000000007>;
using namespace std;
using namespace atcoder;
using ld = long double;
using ll = long long;
#define mp(a,b) make_pair(a,b)
#define rep(i,s,n) for(int i=s; i<n; i++)
const vector<int> dx{1,0,-1,0},dy{0,1,0,-1};
string to_s(__int128_t x){
string s;
bool minus=false;
if(x<0)minus=true,x=-x;
while(x){
s+='0'+x%10;
x/=10;
}
reverse(s.begin(),s.end());
if(minus)s='-'+s;
return s;
}
int main(){
int n;
cin >> n;
if(n>=1){
cout << "0/1";
return 0;
}
n=-n;
vector<__int128_t> x(22);
x[1]=1;
rep(i,2,22){
x[i]=-x[i-1]-10*x[i-2];
}
rep(i,0,22)if(i%2==0)x[i]*=-1;
cout << to_s(x[n+1]) << "/" << 1 << string(n+1,'0');
}