結果
| 問題 | No.1819 Mirrored 2 |
| コンテスト | |
| ユーザー |
沙耶花
|
| 提出日時 | 2022-01-22 00:03:11 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| コード長 | 534 bytes |
| 記録 | |
| コンパイル時間 | 4,537 ms |
| コンパイル使用メモリ | 252,332 KB |
| 最終ジャッジ日時 | 2025-01-27 14:39:48 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 26 |
ソースコード
#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&&y%10!=0)break;
y += Q;
}
mint cur = stoll(ans);
while(cur.val()!=x){
cur *= 10;
ans += '0';
}
cout<<ans<<endl;
return 0;
}
沙耶花