F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_39600751_429.cpp: In function 'int main()':
0_0_39600751_429.cpp:5:167: error: 'cin' was not declared in this scope
    5 | using namespace std;long long powmod(long long a,long long b){long long ans=1;while(b){if(b&1)ans=(ans*a)%mod;a=(a*a)%mod;b>>=1;}return ans%mod;}int t,n,b;int main(){cin>>t;while(t--){scanf("%d%d",&n,&b);b=b%mod;printf("%lld\n",(n*powmod(b,mod-2)+mod)%mod);}return 0;}
      |                                                                                                                                                                       ^~~
0_0_39600751_429.cpp:3:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
    2 | #include<cstring>
  +++ |+#include <iostream>
    3 | const int maxn=1e5+10;
0_0_39600751_429.cpp:5:185: error: 'scanf' was not declared in this scope; did you mean 'isnanf'?
    5 | using namespace std;long long powmod(long long a,long long b){long long ans=1;while(b){if(b&1)ans=(ans*a)%mod;a=(a*a)%mod;b>>=1;}return ans%mod;}int t,n,b;int main(){cin>>t;while(t--){scanf("%d%d",&n,&b);b=b%mod;printf("%lld\n",(n*powmod(b,mod-2)+mod)%mod);}return 0;}
      |                                                                                                                                                                                         ^~~~~
      |                                                                                                                                                                                         isnanf
0_0_39600751_429.cpp:5:213: error: 'printf' was not declared in this scope
    5 | using namespace std;long long powmod(long long a,long long b){long long ans=1;while(b){if(b&1)ans=(ans*a)%mod;a=(a*a)%mod;b>>=1;}return ans%mod;}int t,n,b;int main(){cin>>t;while(t--){scanf("%d%d",&n,&b);b=b%mod;printf("%lld\n",(n*powmod(b,mod-2)+mod)%mod);}return 0;}
      |                                                                                                                                                                                                                     ^~~~~~
0_0_39600751_429.cpp:3:1: note: 'printf' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
    2 | #include<cstring>
  +++ |+#include <cstdio>
    3 | const int maxn=1e5+10;


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-25 09:06:34, Gzip enabled