1337 条题解
-
-1
HummaS LV 9 @ 2016-08-13 18:52:35
#include<cstdio>
int main()
{
int a,b;scanf("%d%d",&a,&b);
while (!a^b&&b)
{
int tmp=a;
a^=b;
b=(tmp&b)<<1;
}
if (b) printf("%d",b);
else printf("%d",a);
}
2333 -
-1@ 2016-08-09 20:13:24
#include <iostream> using namespace std; class A { public : inline void func(int,int); inline void print(); private : int i,j; }; int main() { A a; int q,w; cin >> q >> w; a.func(q,w); a.print(); return 0; } void A::func(int x,int y) { i=x; j=y; } void A::print() { cout << i+j << endl; }noiopenjudge手打测试后发过来……
-
-1@ 2016-08-09 16:57:46
#include <iostream> using namespace std; int main() { int a,b; cin >> a >> b; cout << a+ b << endl; return 0; } -
-1@ 2016-08-07 15:19:02
var a,b:longint; begin read(a,b); write(a+b); end.测试数据 #0: Accepted, time = 0 ms, mem = 804 KiB, score = 10
测试数据 #1: Accepted, time = 0 ms, mem = 800 KiB, score = 10
测试数据 #2: Accepted, time = 0 ms, mem = 800 KiB, score = 10
测试数据 #3: Accepted, time = 0 ms, mem = 800 KiB, score = 10
测试数据 #4: Accepted, time = 0 ms, mem = 804 KiB, score = 10
测试数据 #5: Accepted, time = 15 ms, mem = 800 KiB, score = 10
测试数据 #6: Accepted, time = 0 ms, mem = 800 KiB, score = 10
测试数据 #7: Accepted, time = 0 ms, mem = 800 KiB, score = 10
测试数据 #8: Accepted, time = 0 ms, mem = 804 KiB, score = 10
测试数据 #9: Accepted, time = 15 ms, mem = 800 KiB, score = 10
Accepted, time = 30 ms, mem = 804 KiB, score = 100 -
-1@ 2016-08-01 21:27:16
#include <assert.h> #include<iostream> #include <errno.h> #include <limits.h> #include <locale.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <wchar.h> #include <wctype.h> #include <algorithm> #include <bitset> #include <cctype> #include <cerrno> #include <clocale> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <exception> #include <fstream> #include <functional> #include <limits> #include <list> #include <map> #include <iomanip> #include <ios> #include <iosfwd> #define boom return #define _233 int #define hh cin #define _2333 for using namespace std; int dfs(int x,int y) { if(1) boom y==0?x:dfs(x+1,y-1); } int main() { _233 a,b,ans=dfs(0,0); hh>>a>>b; ans=dfs(a,b); int nums[1010],lon=dfs(0,0); while(ans>0) { nums[++lon]=ans%10; ans/=10; } int num[1010]; memset(num,dfs(0,0),sizeof(num)); _2333(int j=1;j<=lon;j++) { num[lon-j+1]=nums[j]; } _2333(int k=1;k<=lon;k++) cout<<num[k]; dfs(1,1); boom 0; } -
-1@ 2016-07-29 22:25:00
include<stdio.h> include<stdlib.h> int main() { int a,b; scanf("%d %d",&a,&b); printf("%d",a+b); return 0; } -
-1@ 2016-07-29 22:23:49
#include<stdio.h> #include<stdlib.h> int main() { int a,b; scanf("%d %d",&a,&b); printf("%d",a+b); return 0; } -
-1@ 2016-07-26 17:28:09
var
a:array[0..201,0..201] of boolean;
x,j,ans,i,n,m,t:longint;
begin
readln(n,m);
for i:=1 to n do
begin
read(x);
while x<>0 do
begin
a[i,x]:=true; a[x,i]:=true;
read(x);
end;
end;
for i:=1 to n do
begin
t:=0;
for j:=1 to n do
if a[i,j]=true then inc(t);
if t>=m then inc(ans);
end;
writeln(ans);
end. -
-1@ 2016-07-24 15:45:29
print(sum([int(x) for x in raw_input().split(' ')])) -
-1@ 2016-07-24 15:45:16
print(sum([int(x) for x in raw_input().split(' ')]))
-
-1@ 2016-07-12 11:46:17
c++ #include<cstdio> #include<iostream> #include<cmath> #include<cstring> using namespace std; int a[1000],b[1000],c[1000];char ch[1000]; int k; void plus_(){ int temp=0; for(int i = 1; i <= c[0]; i++){ c[i]=temp+(a[i]+b[i])%k; temp=(a[i]+b[i])/k; } if((a[a[0]]+b[b[0]])/k>0){ a[0]++; b[0]++; c[a[0]]=temp; c[0]=a[0]; } } void init(){ cin>>k; cin>>ch; c[0]=strlen(ch); for(int i = 0; i < c[0]; i++){ if(ch[i]<='9'&&ch[i]>='0'){ c[c[0]-i]=ch[i]-'0'; } else{ c[c[0]-i]=ch[i]-'A'+11; } } } int main(){ int flag=0; init(); int ii; for(ii = 1; ii <= 30 &&flag==0; ii++){ b[0]=c[0]; a[0]=c[0]; for(int i = 1; i <= c[0]; i++){ a[i]=c[i]; b[i]=c[c[0]-i+1]; } plus_(); for(int i = 1; i <= c[0]; i++){ if(a[i]==b[i]){ flag=1; } else{ flag=0; break; } } } if(flag==1)cout<<"STEP="<<ii-2; else cout<<"Impossible!"; return 0; } -
-1@ 2016-07-04 19:30:26
#include<stdio.h>
int main()
{
int a,b;
int sum;
scanf("%d %d",&a,&b);
sum=a+b;
printf("%d",sum);
} -
-1@ 2016-06-20 11:36:50
program ex1_1;
var a,b,c:real;
begin
read(a,b);
c:=a+b;
writeln('c=',c);
end. -
-1@ 2016-06-04 17:02:32
var
a,b:integer;
begin
readln(a,b);
writeln(a+b);
end.
这题“太难了”!!! -
-1@ 2016-05-17 12:58:45
var a,b;
begin
read(a,b);
inc(a,b);
write(a);
end. -
-1@ 2016-05-11 21:10:46
我要在这里练一下
A+B Problem题解
##**最简单**的做法!
附上:度娘传送门
太简单啦!
话说代码高亮好像**不支持Java!!!**
我要试一下
java
import java.util.Scanner;
public class Main{
public static void main(String []args){
Scanner in=new Scanner(System.in);//新建扫描仪(其实就是输入用的啦)
int a=in.nextInt(),b=in.nextInt();//使用刚刚新建的扫描仪来输入加数
int ans=a+b;//这一个全国通用......
System.out.println(ans);//输出不解释......
}
}
现在看来话说好像**支持Java啊** -
-1@ 2015-10-23 19:38:09
var
a,b:integer;
begin
read(a,b);
writeln(a+b);
end. -
-1@ 2015-10-18 21:13:47
var
a,b:integer;
begin
readln(a,b);
writeln(a+b);
end. -
-1@ 2015-10-18 20:35:09
var
a,b:integer;
begin
readln(a,b);
writeln(a+b);
end. -
-1@ 2015-10-18 09:09:06
#include<stdio.h>
main()
{
int a,b;
scanf("%d %d",&a,&b);
printf("%d",a+b);
return 0;
}
信息
- ID
- 1000
- 难度
- 9
- 分类
- (无)
- 标签
- (无)
- 递交数
- 75624
- 已通过
- 28862
- 通过率
- 38%
- 被复制
- 277