結果

問題 No.537 ユーザーID
ユーザー mmn15277198
提出日時 2020-06-06 21:00:34
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 479 bytes
コンパイル時間 876 ms
コンパイル使用メモリ 80,816 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-23 13:56:52
合計ジャッジ時間 1,876 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<math.h>
#include<string.h>
#include<vector>
#include<algorithm>
#include<iomanip>
#include<deque>
using namespace std;

int main(){
	long long n;
	cin >> n;
	long long cnt=0;
	for(long long i=1;i*i<=n;i++){
		if(n%i==0){
			cnt+=2;
			if(n/i == i){
				cnt--;
				continue;
			}
			bool f=true;
			long long x=n/i;
			while(x){
				if(x%10!=i){
					f=false;
					break;
				}
				x/=10;
			}
			if(f)cnt--;
		}
	}
	cout << cnt << endl;
	return 0;
}

0