結果
| 問題 | 
                            No.1224 I hate Sqrt Inequality
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2020-09-11 21:39:56 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 1,062 bytes | 
| コンパイル時間 | 2,284 ms | 
| コンパイル使用メモリ | 200,872 KB | 
| 最終ジャッジ日時 | 2025-01-14 10:13:44 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 9 WA * 1 TLE * 3 | 
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define rep(i,a,n) for(ll i=a;i<n;++i)
#define per(i,n) for(ll i=n-1;i>=1;i--)
#define repk(i,a,n) for(ll i=a;i<=n;++i)
#define mod 1000000007
#define all(v) v.begin(), v.end()
#define pi pair<int,int>
#define pl pair<ll,ll>
#define pld pair<ld,ll>
#define di deque<int>
#define pb push_back
#define mp make_pair
#define pq priority_queue
#define F first
#define S second
int p = 1;
const int mn = 1e5 + 5;
string decimal(ll numr, ll denr)
{
	string res;
	unordered_map <ll, ll> mp;
	mp.clear();
	ll rem = numr % denr;
	while ( (rem != 0) && (mp.find(rem) == mp.end()) )
	{
		mp[rem] = res.length();
		rem = rem * 10;
		ll res_part = rem / denr;
		res += to_string(res_part);
		rem = rem % denr;
	}
	return (rem == 0) ? "" : res.substr(mp[rem]);
}
void sol() {
	ll a, b; cin >> a >> b;
	string s = decimal(a, b);
	if (s == "")
		cout << "No\n";
	else
		cout << "Yes\n";
}
int main() {
	// int _;
	// for (scanf("%d", &_); _; _--)
	sol();
	return 0;
}