結果

問題 No.491 10^9+1と回文
ユーザー vjudge1
提出日時 2025-05-16 16:00:44
言語 C++17(gcc12)
(gcc 12.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 333 bytes
コンパイル時間 4,199 ms
コンパイル使用メモリ 208,584 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-05-16 16:00:55
合計ジャッジ時間 7,156 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 103
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define int long long
using namespace std;
int n;
int check(int x){
	int num=-1;
	int t=0;
	while (x){
		t=x%10;
		x/=10;
		num++;
	}
	return num*9+t;
}
signed main ()
{
	freopen("palindrome.in","r",stdin); 
	freopen("palindrome.out","w",stdout); 
	cin>>n;
	int x=n/1000000001;
	cout<<check(x);
	return 0;
}
0