結果
問題 | No.1819 Mirrored 2 |
ユーザー |
![]() |
提出日時 | 2022-01-21 22:07:14 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 478 bytes |
コンパイル時間 | 4,295 ms |
コンパイル使用メモリ | 253,460 KB |
最終ジャッジ日時 | 2025-01-27 13:52:43 |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 25 TLE * 1 |
ソースコード
#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; while(y%10==0){ y += Q; } string ans = to_string(y); reverse(ans.begin(),ans.end()); mint cur = stoll(ans); while(cur.val()!=x){ cur *= 10; ans += '0'; } cout<<ans<<endl; return 0; }