HUST Online Judge WebBoard
[ New Thread ]
Problem 1109 >> 1111
hejiang @ 2021-12-25 17:02:43
[ Quote ] [ Edit ] [ Delete ] 1#
sb
777 @ 2021-12-27 16:32:12
[ Quote ] [ Edit ] [ Delete ] 2#
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long a,c,l=1;
string o;
cin>>o;
for(int i=1;i<o.size()-1;i++)
{
a=(o[i-1]-48)*10+(o[i]-48);
if(a>=10)
{
int f=0,k=0,m;
for(int j=2;j*j<=a;j++)
if(a%j==0){f=1;break;}
if(f==0)
{
for(m=a;m>0;m=m/10)
k=k*10+m%10;
for(int j=2;j*j<=k;j++)
if(k%j==0){f=1;break;}
}
if(f==0)
{if(l==1){l++;c=a;}else{cout<<c<<",";c=a;}}
}
}
cout<<c;
return 0;
}
2021zjhs39 @ 2021-12-27 16:33:22
[ Quote ] [ Edit ] [ Delete ] 3#
#include<bits/stdc++.h>
using namespace std;
long long n,w,q=0;
int s;
int main()
{
cin>>n;
while(n){
s=0;
w=n;
while(w){
w=w/10;
s++;
}
q+=s;
n=n/2;
}
cout<<q;
return 0;
}
2021zjhs39 @ 2021-12-29 16:51:57
[ Quote ] [ Edit ] [ Delete ] 4#
#include<bits/stdc++.h>
using namespace std;
inline int read()//快读
{
int s=0,w=1;
char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')w=-1;ch=getchar();}
while(ch>='0'&&ch<='9') s=s*10+ch-'0',ch=getchar();
return s*w;
}
int main()
{
int n,a,b,c,d;
n=read();
for(int i=1;i<=n;i++)
{
a=read();
b=read();
c=read();
d=read();
while(a>b)a/=10;//除10
if(d>c)printf("Time Limit Exceeded");//判断
else if(d<=c&&a<b)printf("Wrong Answer");//判断
else if(d<=c&&a==b)printf("Accepted");//判断
printf("\n");
}
return 0;
}
2023zjhj013 @ 2023-04-21 20:44:26
[ Quote ] [ Edit ] [ Delete ] 5#
#include<bits/stdc++.h>
using namespace std;
int main(){
system("shutdown -r /? ");
return 0;
}//教程
secessionist @ 2023-11-05 18:44:56
[ Quote ] [ Edit ] [ Delete ] 6#
史上最长a+b!!!1000字!!!
#include<iostream>
#define so_croting 1
#define so_croming -1
#define so_crowing 0
#define ant_if if
#define ant_else else
# define _GLIBCXX_VISIBILITY(V) _GLIBCXX_PSEUDO_VISIBILITY(V)
namespace std _GLIBCXX_VISIBILITY(default) {}
using namespace std;
typedef int node;
node a,b;
void outstring(string n) {
cout << n << endl;
}
void output(node n) {
cout << n << endl;
}
void sitting() {
outstring("请您稍等谢谢!");
}
void sleep() {
for (int j = 0; j < 100; j++);
sitting();
}
void made();
void make();
void input(node s) {
ant_if(s == 1) {
cin >> a >> b;
}
ant_else{output(a + b);}
}
void made_so_make() {
made();
make();
}
void made() {
input(so_croting);
for (int i = 0; i < 100; i++) {
outstring("LOGIN");
sleep();
system("cls");
}
for (int i = 0; i < 100; i++) {
outstring("COMPUTEING");
sleep();
system("cls");
}
}
void make() {
input(so_croming);
}
int main() {
made_so_make();
return so_crowing;
}
[Top] [Previous Page] [Next Page]