#include<iostream>#include<cstring>#include<algorithm>#include<cmath>usingnamespace std;intmain(){int N;
cin >> N;
cout<<N<<"\n";printf("%d nota(s) de R$ 100,00\n", N/100);
N = N %100;printf("%d nota(s) de R$ 50,00\n", N /50);
N = N %50;printf("%d nota(s) de R$ 20,00\n", N /20);
N=N%20;printf("%d nota(s) de R$ 10,00\n", N /10);
N=N%10;printf("%d nota(s) de R$ 5,00\n", N /5);
N=N%5;printf("%d nota(s) de R$ 2,00\n", N /2);
N=N%2;printf("%d nota(s) de R$ 1,00\n", N /1);
N=N%1;}
#include<iostream>#include<cstring>#include<algorithm>usingnamespace std;intmain(){int a, b;double d, c;
cin >> a >> a >> c;
cin >> b >> b >> d;printf("VALOR A PAGAR: R$ %.2f",a*c+b*d);return0;}
#include<iostream>#include<cstring>#include<algorithm>usingnamespace std;int a[50];intmain(){int n;
cin>>n;if(n ==1){
cout <<0;return0;}
a[0]=0,a[1]=1;
cout<<0<<" "<<1<<" ";for(int i =2; i < n; i ++){
a[i]=a[i-1]+a[i-2];
cout<<a[i]<<" ";}return0;}
#include<iostream>#include<cstring>#include<algorithm>usingnamespace std;intmain(){int n;
cin>>n;int a, b, c;
a =0;
b =1;
c =1;for(int i =0; i < n; i ++){
cout << a <<" ";
c = b + c;int t = b;
b = a + b;
a = t;}return0;}
AcWing 726. 质数
#include<iostream>#include<cstring>#include<algorithm>#include<cmath>usingnamespace std;intcheck(int n){if(n<=1)return0;else{for(int i=2;i<=sqrt(n);i++){if( n%i ==0)return0;}return1;}}intmain(){int T;
cin >> T;while(T --){int n;
cin >> n;if(check(n)==0)
cout << n <<" is not prime\n";else
cout << n <<" is prime\n";}return0;}
#include<iostream>#include<cstring>#include<algorithm>#include<cmath>usingnamespace std;intmain(){int n;
cin>>n;for(int i =0; i < n; i ++){int x;
cin>>x;int len =0;for(int j=2;j<=sqrt(x);j++){if(x%j==0){
cout<<x<<" is not prime \n";
len =1;break;}}if(len ==0)
cout<<x<<" is prime\n";}return0;}