Source_Code stringlengths 69 484k | IR_Original stringlengths 2.05k 17.9M |
|---|---|
#include <stdio.h>
int main(void){
int a,b;
scanf("%d %d",&a,&b);
printf("%d %d %lf\n",a/b,a%b,(double)a/(double)b);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122640/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122640/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main() {
int x, y;
int d, r;
double f;
scanf("%d", &x);
scanf("%d", &y);
d=x/y;
r=x%y;
f=(double)x/y;
printf("%d %d %f\n", d, r, f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122684/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122684/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
int a,b,d,r;
scanf("%d %d",&a,&b);
double f;
d=a/b;
r=a%b;
f=1.0*a/b;
printf("%d %d %lf",d,r,f);
return 0;
;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122727/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122727/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
int a,b,d,r;
double f;
scanf("%d %d" ,&a ,&b);
printf("%d %d %f\n" ,a / b ,a % b ,(double)a / b);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122770/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122770/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <float.h>
int main () {
int a;
int b;
int d;
int r;
double f;
scanf("%d %d", &a, &b);
d = a / b;
r = a % b;
f = 1.0 * a / b;
printf("%d %d %.5f\n", d, r, f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122820/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122820/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
int a,b;
scanf("%d %d",&a,&b);
printf("%d %d %.5f\n",a/b,a%b,(double)a/b);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122879/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122879/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
char s[16]={"CODEFESTIVAL2016"};
char t[16];
int count=0;
scanf("%s",t);
for(int i=0;i<16;i++){
if(s[i]!=t[i]) count++;
}
printf("%d",count);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122921/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122921/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#define MAX 100001
#define max2(a,b) a<b?b:a
#define max3(a,b,c) max2((max2(a,b)),c)
#define max4(a,b,c,d) max3((max2(a,b)),c,d)
int main(){
int i,a,b,c,q,w,e,r,t,y;
int n;
char s[17];
char ss[17]="CODEFESTIVAL2016";
a = 0;
scanf("%s",s);
for(i = 0; i<16;i++){
if(ss[i]!=s[i])a++;
}
pri... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122965/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122965/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(){
int i,n,fl=0,ng=0;
for(i=0;i<4 && ng==0;i++){
scanf("%d",&n);
switch(n){
case 1:
fl += 1000;
break;
case 9:
fl += 100;
break;
case 7:
fl += 10;
break;
case 4:
fl += 1;
break;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123014/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123014/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int med3(int x, int y, int z);
void quickSort(int a[], int left, int right);
void sort(int a[], int size);
int A[4];
int main(){
A[0]=getchar();
getchar();
A[1]=getchar();
getchar();
A[2]=getchar();
getchar();
A[3]=getchar();
sort(A, 4);
if(A[0]=='1' && A[1]=='4' && A[2]=='7' && A[3]=='9'... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123058/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123058/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@A = dso_local global [4 x ... |
//tree DP
//ABC036-D
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<stdbool.h>
#include<time.h>
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int max(int a,int b){if(a>b){return a;}return b;}
int min(int a,int b){if(a<b){return a;}ret... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123100/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123100/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.rs = type { i32, i3... |
#include <stdio.h>
int main() {
int H,W,N,i,j,cnt=0,a[10000],jabara[10000];
scanf("%d %d %d", &H, &W, &N);
for (i = 1; i <= N; i++) {
scanf("%d", &a[i]);
}
for (j = 1; j <= N; j++) {
for (i = 0; i < a[j]; i++) {
jabara[cnt] = j;
cnt++;
}
}
cnt = 0;
for (i = 0; i < H; i++) {
if (i % 2 == 0) {
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123144/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123144/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
int main() {
char s[1001], t[1001];
scanf("%s", s);
scanf("%s", t);
char *p;
int i,j;
int count,ans;
ans = 100000;
for (i=0;i<strlen(s)-strlen(t)+1;i++) {
p = &s[i];
count =0;
for (j=0;j<strlen(t);j++) {
if (t[j]!=p[j]) {
count++;
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123195/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123195/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
int main(void){
char s[1001],t[1001];
int countnum,i,j,k,diff=0,ans=2000;
scanf("%s",s);
scanf("%s",t);
// strlen(s)-strlen(t)+1 ←カウントする回数
countnum = (int)(strlen(s)-strlen(t))+1;
for(i=0;i<countnum;i++){
diff = 0;
for(j=0;j<(int)strlen... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123238/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123238/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
int main()
{
char s[1001];
char t[1001];
scanf("%s%s",&s,&t);
int i,j,cnt,sum;
cnt = 0;
sum = 0;
i = 0;
while (s[i])
{
j = 0;
cnt = 0;
while (t[j])
{
if (t[j] == s[i])
cnt++;
if (s[i] == '\0')
{
cnt = 0;
b... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123289/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123289/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
int main(){
char s[103];
scanf("%s",s);
int l;
l=strlen(s);
for(int i=0;i<l;i++)
printf("x");
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123353/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123353/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void) {
int i = 0;
char s[100];
scanf("%s", &s);
while(s[i] != '\0'){
if(s[i] < 120){
s[i] = s[i] + (120 - s[i]);
}else{
s[i] = s[i] - (s[i] - 120);
}
i++;
}... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123397/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123397/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
int main()
{
unsigned char snake[55][55]={0};
unsigned char n=0,m=0,i=0,j=0;
scanf("%d %d",&n,&m);
for(i=0;i<n;i++)
for(j=0;j<m;j++)
snake[i][j]='.';
for(i=0;i<n;i++)
{
if((i+1)%2==1)
{
for(j=0;j<m;j++)
snake[i][j]='#';
}
else
{
if(((i+1)/2)%2==1... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12344/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12344/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include<stdio.h>
int main(){
char a[100];
int i=0;
int cnt=0;
scanf("%s",a);
while(a[i]){
cnt++;
i++;
}
for(int i=0;i<cnt;i++)
printf("x");
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123483/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123483/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
char s[100];
scanf("%s",s);
for(int i=0;i<100;i++){
printf("x");
if(s[i+1]=='\0'){
printf("\n");
break;
}
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123526/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123526/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main()
{
int n=3,m=3, i, j;
scanf("%d %d",&n,&m);
for(j=0;j<n;j++){
if(j%2==0){
for(i=0;i<m;i++){
printf("#");
}
}else if(j%4==1){
for(i=0;i<m-1;i++){
printf(".");
}
printf("#... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12357/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12357/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include <stdio.h>
#include<string.h>
int main(void)
{
char S[100];
int i;
scanf("%s", S);
for(i = 0; i < strlen(S); i++)
{
S[i] = 'x';
}
printf("%s", S);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123612/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123612/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
//set many funcs template
//Ver.20190820
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<stdbool.h>
#include<time.h>
#include<assert.h>
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int max(int a,int b){if(a>b){return a;}return b;}
int... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123656/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123656/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.sd = type { i32, i3... |
#include <stdio.h>
#include <string.h>
int main() {
char s[101] = {0};
scanf("%s", s);
for (int i = 0; i < strlen(s); i++) {
s[i] = 'x';
}
printf("%s", s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123720/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123720/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void){
char s[101];
int i=0;
for(i=0;i<101;i++){
s[i]=0;
}
scanf("%s",s);
i=0;
while(s[i]!=0){
printf("x");
i++;
}
printf("\n");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123771/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123771/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(){
int A,B;
scanf("%d %d", &A, &B);
int coin = 0;
for(int i=0; i<2; i++){
if(A>B){
coin += A;
A--;
}else{
coin += B;
B--;
}
}
printf("%d", coin);
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123814/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123814/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
int a,b,ans;
scanf("%d%d",&a,&b);
if(a == b){
ans = a*2;
}else if(a>b){
ans = a*2-1;
}else{
ans = b*2-1;
}
printf("%d",ans);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123865/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123865/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
int a,b;
scanf("%d%d",&a,&b);
if(a==b)
printf("%d",a*2);
else if(a==b-1 || b==a-1)
printf("%d",a+b);
else
{
if(a>b)
printf("%d",(a*2)-1);
else
printf("%d",(b*2)-1);
}
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123915/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123915/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h> //A - Buttons
int main(){
int a,b;
scanf("%d %d",&a,&b);
int coins=0;
for(int i=0;i<2;i++){
if(a>b){
coins+=a;
a--;
}else{
coins+=b;
b--;
}
}
printf("%d\n",coins);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123959/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123959/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
//#include<std.lib>
int main(void)
{
int A;
int B;
int ans=0;
scanf("%d",&A);
scanf("%d",&B);
for(int i=0;i<2;i++)
{
if(A>B){
ans+=A;
A--;
}
else if(B>A){
ans+=B;
B--;
}
else if(A==B){
ans+=A;
A--;
}
}
printf("%d\n",ans);... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124000/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124000/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
int a,b;
scanf("%d %d",&a,&b);
if(a==b)printf("%d",a*2);
if(a>b)printf("%d",a*2-1);
if(a<b)printf("%d",b*2-1);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124044/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124044/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void){
int a,b;
scanf("%d %d",&a,&b);
if(a==b){
printf("%d\n",a+b);
}else if(a>b){
printf("%d\n",a+a-1);
}else{
printf("%d\n",b+b-1);
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124088/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124088/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<stdlib.h>
int main(){
int a,b,i,r;
r=0;
scanf("%d%d",&a,&b);
for(i=0;i<2;i++){
if(a>b){
r=r+a;
a--;
}
else{
r=r+b;
b--;
}
}
printf("%d",r);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124130/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124130/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
int a;
int b;
scanf("%d",&a);
scanf("%d",&b);
if(a>b){
printf("%d",2*a-1);
}
else if(a==b){
printf("%d",a+b);
}
else if(a<b){
printf("%d",2*b-1);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124181/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124181/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(){
int a,b,c,d,e,f = 0;
scanf("%d",&a);
scanf("%d",&b);
if(a>=b){
c = a;
d = a - 1;
f = b;
}
else if(a<b){
c = b;
d = b - 1;
f = a;
}
if(d>=f){
c += d;
}
if(d<f){
c += f;
}
printf("%d",c);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124224/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124224/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main()
{
int a,b;
scanf("%d %d" , &a,&b);
if(a==b)
printf("%d\n",2*a);
else
{
if(a<b)
a= b;
printf("%d\n",2*a-1);
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124268/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124268/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
int buttonA=0,buttonB=0;
int total=0;
scanf("%d%d",&buttonA,&buttonB);
for(int i=0;i<2;i++)
{
if(buttonA>=buttonB&&buttonA>=3)
{
total+=buttonA;
buttonA--;
}
else if(buttonB<=20)
{
total+=buttonB;
buttonB--;
}
}
printf("%d\n",total);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124310/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124310/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
int main(){
int a, b;
scanf("%d%d", &a, &b);
if(a > b){
printf("%d", a + a -1);
}else if(a == b){
printf("%d", a + b);
}else{
printf("%d", b + b - 1);
}
printf("\n");
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124354/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124354/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
int a,b,ans=0;
scanf("%d%d",&a,&b);
for(int i=0;i<2;i++){
if(a>b){
ans+=a;
a--;
}else{
ans+=b;
b--;
}
}
printf("%d",ans);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124398/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124398/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
int main(){
int num[128],tempn,index[128][128],i,j,k,l,m,alc,count;
char word[128][128],tempw[128],dict[128][128];
i=0;
while(~scanf("%s %d",word[i],&num[i]))i++;
i=i-1;
j=0;
while(j<i)
{
if(strcmp(word[j],word[j+1])>0)
{
strcpy(tempw,word[j]);
strc... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124455/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124455/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#define WHITE 1
#define GREY 2
#define BLACK 3
int adj[100][1000]={{}, {}};
int color[100]={};
int parent[100]={};
int flag=0; // Have a closed circuit 1, otherwise 0;
int E,V;
void dfs_visit(int u);
int main(){
int u, v;
int i;
//input
scanf("%d %d", &V,... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124505/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124505/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@adj = dso_local local_unna... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
struct Unir {
struct Unir * ant;
int encontrado;
char valor;
bool selecionado;
} typedef tUnir;
void printUnir(tUnir * Unir) {
if (Unir->ant != NULL) {
printUnir(Unir->ant);
}
if (Unir->selecionado) {
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124563/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124563/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.Unir = type { ptr, ... |
#if 0
cat <<EOF >mistaken-paste
#endif
// thanks for @rsk0315_h4x
#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
#define _USE_MATH_DEFINES
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#include <time.h>
#define BIG 2000000007
#def... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124613/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124613/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.hwll = type { i64, ... |
#include <stdio.h>
int main(void){
int N,M,i,o,temp,line[100];
scanf("%d %d",&N,&M);
for(i=0;i<N;i++)
scanf("%d",&line[i]);
for(i=1;i<=M;i++){
for(o=0;o<N-1;o++){
if(line[o]%i > line[o+1]%i){
temp=line[o];
line[o]=line[o+1];
li... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124657/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124657/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
/*
* Copyright 2015 Chen Ruichao <linuxer.sheep.0x@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required b... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12470/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12470/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include <float.h>
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
// 内部変数
static FILE *szpFpI; // 入力
static long long slCnt; // 個数
static long long slM; // 積
// 内部変数 - テスト用
#ifdef D_TEST
static int siRes;
static FILE *... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124743/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124743/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@slCnt = internal global i6... |
#include<stdio.h>
int main(){
int n,i,j,a[20];
char b[20],c[20]={"RGB"};
scanf("%d",&n);
while(n--){
int d[20][20]={0};
for(i=0;i<9;i++)scanf("%d" ,&a[i]);
for(i=0;i<9;i++)scanf(" %c",&b[i]);
for(i=0;i<9;i++){
for(j=0;b[i]-c[j];j++);
d[a[i]][j]++;
}
for(j=0;j<3;j++){
fo... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124787/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124787/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@__const.main.c = private u... |
#include<stdio.h>
int main(void)
{
int n,x[1000],y[1000],b[1000],p[1000],i,e[10001],r[10001],z[10001],t[10011],e1[10001],r1[10001];
int z1[10001];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d %d %d",&x[i],&y[i],&b[i],&p[i]);
}
for(i=0;i<n;i++){
if(b[i]>=5 && p[i]>=2){
e[i]=x[i]*b[i];
r[i]=y[i]*p[i];
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124837/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124837/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
// 内部定数
#define D_ON 1 // 汎用フラグ - ON
#define D_OFF 0 // 汎用フラグ - OFF
#define D_BUILD_MAX 15 // 最大建物数
// 内部変数
static FILE *szpFpI; // 入力
static int si1Build[D_BUIL... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124888/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124888/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@si1Build = internal global... |
#include <stdio.h>
int main(void)
{
int X;
scanf("%d",&X);
if(X >= 30){
printf("Yes");
}else{
printf("No");
}
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124930/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124930/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#define N 200010
#define MAX 1000000000000000000
#include <stdio.h>
int main (void) {
int x;
scanf("%d", &x);
if (x >= 30) {
puts("Yes");
} else {
puts("No");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124981/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124981/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
int main ()
{
int temp = 0 ;
scanf("%i",&temp) ;
if (temp >= 30 )
{
printf("Yes");
}
else
{
printf("No");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125023/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125023/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(void)
{
int X;
scanf("%i", &X);
printf("%s\n", X >= 30 ? "Yes" : "No");
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125074/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125074/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
int X;
scanf("%d",&X);
if(X>=-40 && X<=40)
{
if(X>=30)
{
printf("Yes");
}
else
{
printf("No");
}
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125124/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125124/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void)
{
int x;
scanf("%d",&x);
if(x>=30)
printf("Yes\n");
else
printf("No\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125168/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125168/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
int x;
scanf("%d",&x);
if(x>=30){
printf("Yes");
}else{
printf("No");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125218/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125218/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(){
int a;
scanf("%d", &a);
if(a >= 30){
printf("Yes\n");
}else{
printf("No\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125261/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125261/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
int X;
scanf("%d", &X);
if (X >= 30)
printf("Yes\n");
else
printf("No\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125311/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125311/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
int a;
scanf("%d",&a);
if(a>=30) printf("Yes");
else printf("No");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125355/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125355/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void)
{
int X;
scanf("%d",&X);
if(X >= 30){
printf("Yes\n");
} else {
printf("No\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125399/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125399/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
typedef struct {
int no;
int num;
} place_t;
int comp(const void* x,const void* y) {
place_t* a=(place_t*)x;
place_t* b=(place_t*)y;
if(a->num<b->num)return 1;
if(a->num>b->num)return -1;
if(a->no>b->no)return 1;
if(a->no<b->no)return -1;
return 0;
}
int main(void) {
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125470/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125470/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.place_t = type { i3... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h> // uint64_t
#define max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) > (b) ? (b) : (a))
int get_int(void) {
int num;
scanf("%d", &num);
return num;
}
// <arr[0]> <arr[1]> .. <arr[size-1]>
int fget_array(int *arr, int size) {
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125513/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125513/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void)
{
int n,m;
int i,j;
int max,c,cnt[1001];
int a[1001],b[1001];
max=0;
scanf("%d %d",&n,&m);
for(i=0;i<n;i++){
cnt[i]=0;
scanf("%d",&a[i]);
}
for(i=0;i<m;i++){
scanf("%d",&b[i]);
}
for(i=0;i<m;i++){
for(j=0;j<n;j++){
if(b[i]>=a[j]){
cnt[j]++;
break;
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125564/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125564/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdbool.h>
int main(void) {
int i, j, tikaA, tikaB;
int N, M, A[1001], B[1001], na[1001];
scanf("%d%d", &N, &M);
for (i=0; i < N ;i++) {
scanf("%d", &A[i]);
na[i] = 0;
}
for (i=0; i < M ;i++) {
scanf("%d", &B[i]);
}
for (i=0; i < M ;i++) {
for (j=0; j < N ;j++) {
if (B[i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125614/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125614/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
int main()
{
long long int n,k,x,i,j;
scanf("%I64d %I64d",&n,&k);
j=sqrt(k);
for(i=j;i<n+1;i++)
{
x=(i*(i+1))/2-(n-i);
if(x==k)
break;
}
printf("%I64d\n",n-i);
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12568/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12568/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include <stdio.h>
int main(void){
char a[1010];
int i;
fgets(a,1001,stdin);
for(i=0;a[i]!='\0';i++){
if(a[i]=='p'&&a[i+1]=='e'&&a[i+2]=='a'&&a[i+3]=='c'&&a[i+4]=='h'){
a[i]='a';
a[i+1]='p';
a[i+2]='p';
a[i+3]='l';
a[i+4]='e';
}
else if(a[i]=='a'&&a[i+1]=='p'&&a[i+2]=='p'&&a[i+3]=='l'&&a[i+4]==... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125737/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125737/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@stdin = external local_unn... |
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main(void){
char s[100];
scanf("%s",s);
for(int i=0;s[i]!='\0';i++){
if(i%2==0){
if(s[i]!='h'){printf("No\n");return 0;}
}
else{
if(s[i]!='i'){printf("No\n");return 0;}
}
if(s[i]!='h'&&s[i]!='i'){printf("No\n");return 0;}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125823/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125823/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
int main(){
char s[99];
scanf("%s",s);
int n = strlen(s),i;
int x = 1;
if(n%2!=0){
printf("No");
return 0;
}
for(i = 0; i < n; i++){
if((i+1)%2==1 && s[i]!='h'){
x = 0;
break;
}else if((i+1)%2==0 && s[i]!= 'i'){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125867/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125867/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
int main()
{
char s[20];
scanf("%s", s);
int i, n = strlen(s);
if (n % 2 > 0)
{
printf("No\n");
return 0;
}
for (i = 0; i < n; i++)
{
if (i % 2 > 0)
{
if (s[i] != 'i')
{
printf("No\n");
return 0;
}
}
else
{
if (s[i] != 'h')
{
printf("... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125924/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125924/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
int N,Y,SEN,GOSEN,MAN,BOOL=0,i,j,k;
scanf("%d %d",&N,&Y);
for(i=0;i<=N;i++)
{
for(j=0;j<=N;j++)
{
k=N-(i+j);
if(k>=0&&i+j+k==N&&10000*k+5000*j+1000*i==Y)
{
MAN=k;
GOSEN=j;
SEN=i;
BOOL=1;
break;
}
}
}
if(BOO... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125968/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125968/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
#include<string.h>
int main(){
int N,Y;
scanf("%d %d",&N,&Y);
for(int i=0;i<=N && 10000*i<=Y;i++){
for(int j=0;i+j<=N && 10000*i+5000*j<=Y;j++){
if(i*10000+j*5000+(N-i-j)*1000 == Y){
printf("%d %d %d",i,j,N-i-j);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126017/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126017/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void) {
long long int N,Y;
scanf("%lld %lld",&N,&Y);
int i,j,k,cnt=0;
for(i=0;i<=N;i++){
if(cnt==1){
break;
}
for(j=0;j<=N;j++){
k=(N-i-j);
if(cnt==1){
break;
}
if(Y==(i*10000)+(j*5000)+(k*1000)&&(i+j+k)==N&&k>=0){
printf("%d %d %d",i,j,k);
cnt=1;
br... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126060/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126060/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#define mod 1e9+7
#define ll long long int
#define epsilon 1e-7
int main(void){
int n, y;
scanf("%d %d", &n, &y);
int ans = 0;
int a, b, c;
for(int i = 0;i <= n;i++){
for(int j = 0;j <= n-i;j++){
if(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126103/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126103/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
int N;
long long Y;
scanf("%d%lld",&N,&Y);
for(int i = 0;i <= N;i++){
if(i*10000 > Y) break;
for(int j = 0;j <= N-i;j++){
if(i*10000+j*5000 > Y) break;
int k = N-i-j;
if(i*10000+j*5000+k*1000 == Y){
printf("%d %d %d\n",i,j,k);
return... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126147/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126147/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
int n, Y;
int x = -1, y = -1, z = -1;
scanf("%d %d", &n, &Y);
for(int a = 0; a <= n; a++){
for(int b = 0; b + a <= n; b++){
int c = n - a - b;
int sum = 10000 * a + 5000 * b + 1000 * c;
if(sum == Y){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126190/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126190/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main()
{
int f=0,n,s,i,j,k;
scanf("%d%d",&n,&s);
for(i=0;i<=s/10000;i++)
{for(j=0;j<=s/5000;j++)
{
k=n-i-j;
if(i*10000+j*5000+k*1000==s && k>=0 && k<=s/1000)
{
f=1;printf("%d %d% d\n",i,j,k);
break;
}
}
if(f) brea... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126233/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126233/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
// AOJ 0612 Sandcastle
// 2018.2.26 bal4u
#include <stdio.h>
#include <ctype.h>
typedef struct { short r, c; } Q;
Q q[2][2000]; int top[2], tail[2];
char map[1002][1002];
char a[1002][1002];
int mv[8][2] = {{-1,0},{-1,1},{0,1},{1,1},{1,0},{1,-1},{0,-1},{-1,-1}};
int main()
{
int h, w, r, c, i, k1, k2, nr, nc, ans, ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126284/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126284/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.Q = type { i16, i16... |
#include <stdio.h>
#include <string.h>
int main(void)
{
long long ans[100][21];
int i, j;
int n, num[100];
scanf("%d", &n);
memset(num, 0, sizeof(num));
memset(ans, 0, sizeof(ans));
for (i = 0; i < n; i++){
scanf("%d", &num[i]);
}
ans[0][num[0]] = 1;
for (i = 1; i < n - 1; i++){
for (j = 0; j < 21; j++... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126341/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126341/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int gcd(int x,int y){
int n1,n2,k1;
if(x>y){
n1=x; n2=y;
}
else{
n1=y; n2=x;
}
while((n1%n2)!=0){
k1=n1;
n1=n2;
n2=(k1%n2);
}
return n2;
}
void main(){
int i,j,k,n,g;
long sum=0;
scanf("%d",&n);
for(i=1;i<=n;i++){
for(j=1;j<=n;j++){
for(k=1;k<... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126406/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126406/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void)
{
int no,loc;
scanf("%d%d", &no, &loc);
int go[no], come[no];
for(int i=0;i<no;i++)
scanf("%d", &go[i]);
for(int i=0;i<no;i++)
scanf("%d", &come[i]);
if(go[0]==0)
{ printf("NO\n");
return 0;}
if(go[loc-1]==0&&come[loc-1]==0)
{printf("NO\n");
return 0;}
if(g... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12645/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12645/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include <stdio.h>
#include <math.h>
int main(){
int k, ans=0, r1, r2, l, m, n, a=1, b=1, c=1;
scanf("%d", &k);
while(a <= k){
while(b <= k){
while(c <= k){
if(a==c){
ans += a;
}
else{
l = a, m = b, n = c;//aとcの最大公約数r1
r1 = n % l;
while(r1!=0){
n = l;
l = r1;
r... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126493/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126493/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#define rep(i, n) for(int i=1; i<(int)(n);i++)
int main(){
int a, b, c, k, ans=0;
int gcd_3(int ,int ,int );
scanf("%d",&k);
rep(a,k+1){
rep(b,k+1){
rep(c,k+1){
ans += gcd_3(a,b,c);
}
}
}
printf("%d",ans);
}
int gcd_3(int a,int b,int c){
int gcd(int ,int )... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126543/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126543/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include <math.h>
#include <stdlib.h>
int gcd(int a, int b, int c)
{
int i=c,max;
if(a>=b && a>=c)
{
i=a;
}
if(b>=a,b>=c)
{
i=b;
}
while(i>0)
{
if(a%i==0 && b%i==0 && c%i==0)
{
max=i;
break;
}
i--;
}
return max;
}
int main(vo... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126600/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126600/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int gcd(int x, int y);
int main()
{
int a, b, c, N;
int sum=0;
scanf("%d", &N);
for(c=1;c<=N;c++){
for(b=1;b<=N;b++){
for(a=1;a<=N;a++){
sum += gcd(gcd(a,b),c);
}
}
}
printf("%d", sum);
return... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126644/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126644/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int gcb(int a,int b,int c){
int d,X,i;
if(a<=b && a<=c){
d=a;
}
if(b<=a && b<=c){
d=b;
}
if(c<=a && c<=b){
d=c;
}
for(i=1;i<d+1;i++){
if(a%i==0 && b%i==0 && c%i==0){
X=i;
}
}
return X;
}
int main(){
int N,a,b,c;
long int S=0;
scanf("%d",&N)... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126688/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126688/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
int gcd( int a, int b )
{
if( b == 0 ) return( a );
return( gcd( b, a % b ) );
}
int main( int argc, char *argv[] )
{
int n;
long long tot = 0;
scanf( "%d", &n );
for( int i=1; i<=n; i++ )
for( int j=1; j<=n; j++ )
for( int k=1; k<=n; k++ ) {
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126730/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126730/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<stdlib.h>
#include<stdint.h>
#include<inttypes.h>
typedef int32_t i32;
typedef int64_t i64;
const i32 mod = 1000000007;
i32 mod_pow (i32 r, i32 n) {
i32 t = 1;
i32 s = r;
while (n > 0) {
if (n & 1) t = (i64) t * s % mod;
s = (i64) s * s % mod;
n >>= 1;
}
return t;
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126774/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126774/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@mod = dso_local local_unna... |
#include<stdio.h>
int main(){
int k=0,a[10010],n,i,j,b[65];
long int ans=0;
while(1){
scanf("%d\n",&n);
if(n==0){
break;
}
for(i=0;i<61;i++){
b[i]=0;
}
for(i=0;i<n;i++){
scanf("%d\n",&a[i]);
b[a[i]]++;
}
for(i=0;i<61;i++){
for(j=0;j<b[i];j++){
a[k]=i;
k++;
}
}
k=0;
for(i=0;i<n;i++){
ans=ans+a[i]*(n-i-1);
}
printf("%ld\... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126824/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126824/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
int n,m,a,b,i;
scanf("%d%d",&n,&m);
int road[1010]={0};
for(i=1;i<=m;i++)
{
scanf("%d%d",&a,&b);
road[a]=1;
road[b]=1;
}
for(i=1;i<=n;i++)
{
if(road[i]==0)
break;
}
int ans=i;
printf("%d\n",n-1);
for(i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12694/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12694/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include<stdio.h>
int main(void){
char s[100000];
int i;
scanf("%s", s);
for(i = 0;s[i];i++){
if(i % 2 == 0)
printf("%c", s[i]);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126983/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126983/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
int main(void){
char s[100000];
scanf("%s", s);
int n = strlen(s);
for (int i = 0; i < n - 2; i += 2){
printf("%c",s[i]);
}
if (n % 2 == 1){
printf("%c\n", s[n - 1]);
}
else {
printf("%c\n", s[n - 2]);
}
return 0;
}... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127025/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127025/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
int main()
{
char s[100001];
scanf("%s", s);
int i;
int len = strlen(s);
for (i=0; i<len; i+=2)
{
printf("%c", s[i]);
}
printf("\n");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127090/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127090/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
int main(){
char s[100000];
int i,j;
scanf("%s",s);
//printf("%c\n",s[1]);
for(i=0;i<strlen(s);i+=2){
printf("%c",s[i]);
}
printf("\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127148/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127148/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
int cmpAsc(const void * n1, const void * n2) {
if (*(long *)n1 > *(long *)n2)
{
return 1;
}
else if (*(long *)n1 < *(long *)n2)
{
return -1;
}
else
{
return 0;
}
}
int cmpDes(const void * n1, const void * n2) {
if (*(long *)n1 > *(long *)n2)
{
return -1;
}
el... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127199/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127199/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
int N;
scanf("%d",&N);
long long A[N],B[N],C[N];
for(int i=0;i<N;i++){
scanf("%lld%lld",&A[i],&B[i]);
C[i]=A[i]+B[i];
}
//sort
int h=N;
int swapped=0;
while(h>1 || swapped==1){
if(h>1)h=h*10/13;
swapped=0;
for(int i=0;i+h<N;i++){
if(C[i]<C[i+h]){
long long t... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127241/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127241/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#define MAX 10000
int main(){
char x[MAX];
int i, j;
int sum1 = 0;
int sum2[MAX] = {};
for(i = 0; i < MAX; i++){
scanf("%s", x);
if(x[0] == '0') break;
for(j = 0; x[j] != '\0'; j++){
sum1 += x[j] - '0';
}
sum2[i] = sum1;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127285/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127285/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
char num[1000];
int sum,i,j;
while(1){
for(i = 0; ;i++){
scanf("%c",&num[i]);
if(num[i]=='\n')break;
}
sum = 0;
for(j = 0; j < i; j++){
sum += num[j] - '0';
}
if(sum==0)break;
printf("%d\n",sum);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127335/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127335/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void)
{
char num[1000];
int count,sum;
while(1){
scanf("%s", num);
if(num[0]=='0') break;
count=0;
sum=0;
while(1){
if(num[count]=='\0') break;
sum+=(int)num[count++]-48;
}
printf("%d\n",sum);
}... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127379/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127379/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(void){
char num_str[1002];
int num;
long sum = 0;
int i;
char tmp;
while(1){
fgets(num_str, sizeof(num_str), stdin);
if(num_str[0] == '0') break;
for(i=0;i<strlen(num_str)-1;i++){
tmp=num_str[i];
num=atoi(&tmp);
sum=sum+num;
}
printf("%ld... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127429/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127429/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@stdin = external local_unn... |
#include <stdio.h>
int main(void)
{
char c;
int a;
while(scanf("%c", &c), c != '0'){
a=0;
a += c%48;
while(scanf("%c", &c), c != '\n'){
a += c%48;
}
printf("%d\n", a);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127487/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127487/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.