結果
| 問題 |
No.1842 Decimal Point
|
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2025-10-24 16:09:00 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 470 bytes |
| コンパイル時間 | 1,441 ms |
| コンパイル使用メモリ | 162,580 KB |
| 実行使用メモリ | 15,940 KB |
| 最終ジャッジ日時 | 2025-10-24 16:09:06 |
| 合計ジャッジ時間 | 6,140 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 2 TLE * 1 -- * 2 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define int long long
int p,t;
int qpow(int a,int b,const int &p){
int ans=1;
while(b){
if(b&1)
ans=ans*a%p;
a=a*a%p;
b>>=1;
}
return ans;
}
signed main(){
ios::sync_with_stdio(0);
cin>>p>>t;
while(t--){
int a,b,c,d;
cin>>a>>b>>d;
c=10;
a=a%b;
cout<<a*qpow(c,d-1,b)%b*c/b<<'\n';
}
cout<<flush;
return 0;
}
vjudge1