結果
| 問題 |
No.928 軽減税率?
|
| コンテスト | |
| ユーザー |
LayCurse
|
| 提出日時 | 2019-11-22 21:38:49 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 1,000 ms |
| コード長 | 1,316 bytes |
| コンパイル時間 | 2,527 ms |
| コンパイル使用メモリ | 209,232 KB |
| 最終ジャッジ日時 | 2025-01-08 04:45:05 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 34 |
ソースコード
#pragma GCC optimize ("Ofast")
#include<bits/stdc++.h>
using namespace std;
inline void rd(long long &x){
int k;
int m=0;
x=0;
for(;;){
k = getchar_unlocked();
if(k=='-'){
m=1;
break;
}
if('0'<=k&&k<='9'){
x=k-'0';
break;
}
}
for(;;){
k = getchar_unlocked();
if(k<'0'||k>'9'){
break;
}
x=x*10+k-'0';
}
if(m){
x=-x;
}
}
inline void wt_L(char a){
putchar_unlocked(a);
}
inline void wt_L(long long x){
int s=0;
int m=0;
char f[20];
if(x<0){
m=1;
x=-x;
}
while(x){
f[s++]=x%10;
x/=10;
}
if(!s){
f[s++]=0;
}
if(m){
putchar_unlocked('-');
}
while(s--){
putchar_unlocked(f[s]+'0');
}
}
int main(){
int i;
long long P;
long long Q;
long long A;
long long res = 0;
long long mx = 0;
rd(P);
rd(Q);
rd(A);
for(i=(1);i<(10000000+1);i++){
if( (100+P) * i / 100 < (100+Q)*i/100 + A ){
res++;
mx = i;
}
}
if(mx==10000000){
res += 1000000000 - 10000000;
}
wt_L(res);
wt_L('\n');
return 0;
}
// cLay varsion 20191111-2
// --- original code ---
// {
// ll P, Q, A, res = 0, mx = 0;
// rd(P,Q,A);
// rep(i,1,1d7+1) if( (100+P) * i / 100 < (100+Q)*i/100 + A ) res++, mx = i;
// if(mx==1d7) res += 1d9 - 1d7;
// wt(res);
// }
LayCurse