結果
| 問題 | No.1819 Mirrored 2 | 
| コンテスト | |
| ユーザー |  沙耶花 | 
| 提出日時 | 2022-01-22 00:01:17 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 525 bytes | 
| コンパイル時間 | 4,340 ms | 
| コンパイル使用メモリ | 253,008 KB | 
| 最終ジャッジ日時 | 2025-01-27 14:39:31 | 
| ジャッジサーバーID (参考情報) | judge5 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 24 WA * 2 | 
ソースコード
#include <stdio.h>
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
using mint = modint;
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define Inf 1000000001
int main(){
	
	mint::set_mod(90007);
	
	long long P,Q,x,y;
	cin>>P>>Q>>x>>y;
	string ans;
	while(true){
		ans = to_string(y);
		reverse(ans.begin(),ans.end());
		mint cur=  stoll(ans);
		if(cur!=0)break;
		y += Q;
	}
	
	mint cur = stoll(ans);
	while(cur.val()!=x){
		cur *= 10;
		ans += '0';
	}
	cout<<ans<<endl;
	
	return 0;
}
            
            
            
        