結果
問題 |
No.491 10^9+1と回文
|
ユーザー |
![]() |
提出日時 | 2017-03-10 23:26:21 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 490 bytes |
コンパイル時間 | 669 ms |
コンパイル使用メモリ | 57,420 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-24 08:46:20 |
合計ジャッジ時間 | 2,879 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 42 WA * 61 |
ソースコード
#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; }