結果
| 問題 | No.491 10^9+1と回文 |
| コンテスト | |
| ユーザー |
No___Op
|
| 提出日時 | 2017-03-10 23:03:50 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 504 bytes |
| 記録 | |
| コンパイル時間 | 518 ms |
| コンパイル使用メモリ | 69,872 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-24 08:31:47 |
| 合計ジャッジ時間 | 2,860 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 3 WA * 100 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <cmath>
#include <cstdio>
#include <cstring>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
int main(){
long long int n, res = 1; cin >> n;
if(n/1000000000 == 1){
cout << n/1000000001 << endl;
return 0;
}
n = n / 1000000000;
while(1){
if(n/10 != 0){
res += 3;
n /= 10;
}else{
res *= (n-1);
break;
}
}
cout << res << endl;
return 0;
}
No___Op