結果
問題 | No.744 循環小数N桁目 Easy |
ユーザー |
![]() |
提出日時 | 2018-11-09 21:13:15 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 668 bytes |
コンパイル時間 | 1,017 ms |
コンパイル使用メモリ | 111,388 KB |
最終ジャッジ日時 | 2025-01-06 15:55:54 |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <string.h> #include <iomanip> #include <math.h> #include <string> #include <queue> #include <map> #include <set> #include <functional> using namespace std; typedef long long int ll; typedef std::pair<int, int> pii; typedef std::pair<ll, int> pli; typedef std::pair<ll, ll> pll; #define FOR(i,n,m) for(ll i=(ll)(m);i<(ll)(n);++i) #define REP(i,n) FOR(i,n,0) #define IREP(i,n) for(ll i=(ll)(n);i>=0;--i) #define OF64 std::setprecision(10) const ll MOD = 1000000007; const ll INF = (ll)1e15; int c[6] = { 2,8,5,7,1,4 }; int main() { int N; cin >> N; cout << c[(N - 1) % 6] << endl; return 0; }