結果

問題 No.491 10^9+1と回文
ユーザー 777yuuki12323
提出日時 2017-03-10 23:24:57
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 488 bytes
コンパイル時間 419 ms
コンパイル使用メモリ 57,344 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-24 08:44:49
合計ジャッジ時間 2,723 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 103
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>

typedef long long ll;
#define fi first
#define se second

ll n;

using namespace std;

int main(){
  
  cin>>n;
  
  cout<<n<<endl;
  
  ll i, j;
  
  int ans = 0;
  
  for( i = 1; i < 1123456789; i = i*10+1 ){
    for( j = 1; j < 10; j++ ){
      if( n >= i*j*1000000001ll ){
        ans++;
        //printf("%lld %lld\n", i, j );
      }
      else{ break;}
    }
  }  
  
  cout<<ans<<endl;
  
  return 0;
}
0