結果
問題 |
No.589 Counting Even
|
ユーザー |
![]() |
提出日時 | 2017-11-03 23:59:16 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 440 bytes |
コンパイル時間 | 1,552 ms |
コンパイル使用メモリ | 167,216 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-23 15:15:16 |
合計ジャッジ時間 | 2,504 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 WA * 24 |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define reps(i,s,n) for(int i=(int)(s);i<(int)(n);i++) const ll mod = 1e9 + 7; const int INF = 1e9; int main() { cin.sync_with_stdio(false); int N; cin >> N; ll k = N / 8+1; ll x = N% 8; int m[8] = {0,0,1,0,3,2,3,7}; ll ans = k*m[x]; ans += (k - 1)*(7 - x); cout << ans << endl; return 0; }