結果

問題 No.793 うし数列 2
ユーザー Ner7hxH9Z6mnqYJ
提出日時 2019-04-25 17:27:05
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 369 bytes
コンパイル時間 1,920 ms
コンパイル使用メモリ 158,528 KB
実行使用メモリ 17,104 KB
最終ジャッジ日時 2024-11-20 20:18:28
合計ジャッジ時間 41,208 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 3 WA * 5 TLE * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;
  int num;
  
  num = pow(10,N);
  for(int i = N - 1; i >= 0; i--){
    num = num + 3 * pow(10, i);
  }
  double ans = num % 1000000007;
  if(ans != 0 && num > 1000000007){
    cout << ans;
  }
  
  else if(ans != 0 && num < 1000000007){
    cout << num;
  }
  
  else{}
      
}
  
  
  
0