Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> int main() { long long i,j,k,n,m,l,a,b,c; long long A[101][101] = {0}; long long B[101][101] = {0}; long long C[101][101] = {0}; scanf("%lld %lld %lld",&n,&m,&l); for(j=0; j<n; j++) { for(i=0; i<m; i++) { scanf("%lld", &a); A[j][i] = a; } } for(j=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156341/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156341/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,l; int a[101][101]={{0}}; int b[101][101]={{0}}; long c[101][101]={{0}}; scanf("%d%d%d",&n,&m,&l); for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ scanf("%d",&a[i][j]); } } for(int i=0;i<m;i++){ for(int j=0;j<l;j++){ scanf("%d",&b[i][j]); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156385/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156385/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 A[101][101]={0}; long long int B[101][101]={0}; long long int C[101][101]={0}; long long i, j, m, n, l, k; scanf("%lld %lld %lld", &n, &m, &l); for(j=0; j<n; j++){ for(i=0; i<m; i++){ scanf("%lld", &A[j][i]); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156428/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156428/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...
#pragma GCC optimize("Ofast") #include<stdio.h> int main(){ unsigned long N, K, ans = 0, v[100001]; scanf("%lu%lu", &N, &K); for(unsigned long i = 1; i <= K; ++i)v[i] = i; for(unsigned long i = 2; i <= K; ++i)if(v[i] == i)for(unsigned long j = i; j <= K; j += i)v[j] = (v[j] / i) * (i - 1); for(unsi...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156471/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156471/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> #define MAX 100000 #define min(a, b) a < b ? a : b int main(void) { long long N, a, b; long long x[MAX]; int i; long long sum = 0; scanf("%lld %lld %lld", &N, &a, &b); for (i = 0; i < N; i++) { scanf("%lld", &x[i]); } /*printf("%d...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156514/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156514/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 D, N; scanf("%d%d", &D, &N); if (D == 0) { if (N == 100) { printf ("%d\n", N + 1); } else { printf ("%d\n", N); } } if (D == 1) { if (N == 100) { printf ("%d\n", 101 * 100); } els...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156558/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156558/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 power(int,int); int main(void){ int D, N; scanf("%d %d", &D, &N); if(N==100) N++; printf("%d\n", power(100, D) * N); return 0; } int power(int a, int b){ int i, w=1; for(i=0; i<b; i++) w *= a; return w; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156600/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156600/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 D,N; scanf("%d%d",&D,&N); if(N == 100){ printf("101"); }else{ printf("%d",N); } while(D > 0){ printf("00"); D--; } printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156651/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156651/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,d,i,r; r = 1; scanf("%d",&d); scanf("%d",&n); for(i = 0;i < d;i++){ r *= 100; } if(n == 100){ printf("%d",r*(n+1)); return 0; } printf("%d",r*n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156701/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156701/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, i, j; int result = 0; int num = 1; scanf("%d", &a); scanf("%d", &b); for (i=0; i<a; i++) { num *= 100; } for (j=0; j<b; j++) { result += num; if (result % (num * 100) == 0) { result += num; } } printf("%d\n", result); re...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156745/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156745/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 D,N; scanf("%d",&D);scanf("%d",&N); int a[100]; int i; for(i=0;i<100;i++){ a[i] = i+1; } if(D==0){ if(N==100){ printf("%d",101); }else{ printf("%d",a[N-1]); } }else if(D==1){ if(N==100) printf("10100"); else printf("%d",a[N-1]*100); }else{ if(N==100)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156789/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156789/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 ll long long #define rep(i,l,r)for(ll i=(l);i<(r);i++) char s[1010][1099]; int main(){ ll n; while(scanf("%lld",&n),n){ rep(i,0,n){ scanf(" %s",s[i]); int j=0; while(s[i][j]=='.'){ if(s[i][j+1]=='.')s[i][j]=' '; else{ s[i][j]='+'; int temp=i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156839/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156839/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 ch1, ch2, arry = 'A'; while(scanf("%c,%c", &ch1, &ch2) != EOF){ if (arry == ch1 || arry == ch2){ if (arry == ch1) arry = ch2; else arry = ch1; } } printf("%c\n", arry); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156897/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156897/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 ball,buf[4],i; ball='A'; i=0; while(fgets(buf,4,stdin)!=NULL){ if(buf[0]==ball){ ball=buf[2]; }else if(buf[2]==ball){ ball=buf[0]; } } printf("%c\n",ball); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156947/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156947/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 c1, c2; char ball; ball = 'A'; while (scanf("%c,%c", &c1, &c2) != EOF){ if (c1 == ball){ ball = c2; } else if (c2 == ball){ ball = c1; } } printf("%c\n", ball); return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157010/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157010/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,j,n; scanf("%d",&n); double m[n+1][n+1]; double p[n],k=0.0; for(i=0;i<n;i++) scanf("%lf",&p[i]); for(i=0;i<n+1;i++) { for(j=0;j<n+1;j++) m[i][j]=0.0; } m[0][0]=1; for(i=1;i<n+1;i++) { for(j=0;j<n+1;j++) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157076/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157076/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 a; scanf("%c",&a); if(a=='A') puts("T"); else if(a=='T') puts("A"); else if(a=='C') puts("G"); else puts("C"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157119/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157119/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[100]; int count; scanf("%s",s); for(count=0;s[count]!='\0';count++){ if(s[count]=='A'){s[count]='T';} else if(s[count]=='T'){s[count]='A';} else if(s[count]=='C'){s[count]='G';} else if(s[count]=='G'){s[count]='C';} } printf("%s",s); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157177/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157177/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; scanf("%d %d %d %d",&a,&b,&c,&d); if(c>a) c=c-a; else c=a-c; if(d>b) d=d-b; else d=b-d; if(c>d) printf("%d",c); else printf("%d",d); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15722/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15722/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(){ char S[100]; scanf("%s",&S); if(!strcmp(S,"A")){ printf("T");} else if(!strcmp(S,"T")){ printf("A");} else if(!strcmp(S,"C")){ printf("G");} else if(!strcmp(S,"G")){ printf("C");} return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157263/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157263/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 c; scanf("%c", &c); if(c == 'A') puts("T"); if(c == 'C') puts("G"); if(c == 'T') puts("A"); if(c == 'G') puts("C"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157328/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157328/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() { char b; scanf("%c",&b); switch(b){ case 'A': printf("T"); break; case 'G': printf("C"); break; case 'C': printf("G"); break; case 'T': printf("A"); break; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157371/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157371/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 b; scanf("%c",&b); switch(b){ case 'A' : puts("T"); break; case 'T' : puts("A"); break; case 'G' : puts("C"); break; case 'C' : puts("G"); break; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157414/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157414/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 b; scanf("%c",&b); if(b == 'A') { printf("T\n"); } else if(b == 'C') { printf("G\n"); } else if(b == 'G') { printf("C\n"); } else if(b == 'T') { printf("A\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157458/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157458/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 c; scanf("%c",&c); if(c=='A') printf("T"); if(c=='C') printf("G"); if(c=='G') printf("C"); if(c=='T') printf("A"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157500/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157500/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 a; scanf("%c",&a); if(a=='A')puts("T"); if(a=='T')puts("A"); if(a=='G')puts("C"); if(a=='C')puts("G"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157551/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157551/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 DPL_5_L Balls and Boxes 12 // n 個の区別できないボールを k 個の区別できない箱に入れる // とき、可能な入れ方の総数を求めてください。 // ただし、 // どのボールも、必ずいずれかの箱に入れる。 // どの箱にも、1つ以上のボールを入れる。 // 答えは制限付き分割数 divnum(n-k, k) // 2019.3.11 bal4u #include <stdio.h> #include <stdlib.h> #define MOD 1000000007 int tbl[1001][1001]; int divnum(int n, int k) { int ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157595/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157595/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" @tbl = dso_local local_unna...
#include<stdio.h> #include<string.h> #include<math.h> #include<stdlib.h> #include<limits.h> #define rep(i,begin,end) for(int i=begin; i<end; i++) #define revrep(i,begin,end) for(int i=begin; i>end; i--) #define lld long long int int cmpAsc(const void* a, const void* b){ char x = *(char*)a, y = *(char*)b; if(x...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157638/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157638/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> int sl(const void *a,const void*b){ return *(int*) a - *(int*) b; } int ls(const void *a,const void*b){ return *(int*) b - *(int*) a; } int main(){ char s[101],t[101]; scanf("%s%s",s,t); int u[101],v[101],i; for(i=0;i<strlen(s);i++){ u[i]=(s[i]-'a...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157681/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157681/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[101], t[101]; scanf("%s", s); scanf("%s", t); int s_len = strlen(s); char s_res[101]; for (int i=0; i<s_len; i++) { int min_idx = 0; for (int j=1; j<s_len; j++) { if (s[j] < s[min_idx]) { min_idx = j; } } s_res[i] = s[min_idx]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157731/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157731/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(void){ int N; int K; int min; scanf("%d",&N); scanf("%d",&K); int i = K; int c = 1; while(i < N){ i = i+ (K-1); c = c + 1; } printf("%d",c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157782/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157782/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> #include<string.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; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157825/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157825/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> #include<string.h> int main(){ char s[200001]; scanf("%s",s); int i,d=0; char t[200001],v[200001][2]; strcpy(t,""); for(int i=0;i<200001;i++){ v[i][0]=s[i]; v[i][1]='\0'; } char u[200001]=""; for(i=0;i<200001;i++){ strcat(u,v[i]); if...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157869/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157869/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> #include <math.h> int main(void){ int c[3][3]; for(int i = 0; i < 3; i++){ for(int j = 0; j < 3; j++){ scanf("%d", &c[i][j]); } } int f = 1; for(int x = 0; x <= 100; x++){ if(f ==...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157911/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157911/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 c[3][3]; for (int i = 0; i < 3; i++) { scanf("%d %d %d", &c[i][0], &c[i][1], &c[i][2]); } int flag = 0; for (int i = 0; i < 2; i++) { int tmp = c[0][i+1] - c[0][i]; for (int j = 1; j < 3; j++) { if (tmp != (c[j][i+1] - c[j][i])) flag = 1; } if (flag == 1) break; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157955/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157955/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> #define ll long long #define rep(i,l,r)for(ll i=(l);i<(r);i++) #define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k)) #define INF ((1LL<<62)-(1LL<<31)) #define max(p,q)((p)>(q)?(p):(q)) #define min(p,q)((p)<(q)?(p):(q)) ll a[3][3]; int main(){ rep(i,0,3)rep(j,0,3)scanf("%lld",&a[i][j])...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158011/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158011/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; int c1[5], c2[5], c3[5]; int a1, a2, a3, b1, b2, b3; for (i = 0; i < 3; i++) scanf("%d", &c1[i]); for (i = 0; i < 3; i++) scanf("%d", &c2[i]); for (i = 0; i < 3; i++) scanf("%d", &c3[i]); a1 = 0; b1 = c1[0]; b2 = c1[1]; b3 = c1[2]; a2 = (c2[0] + c2[1] - b1 - b2...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158055/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158055/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, ctr = 0; scanf("%d", &n); char input[n]; scanf("%s", input); for(int i = 0; i < 1500; i++) { int math[3] = {i%10, i/100 ,(i/10)%10}; int temp = 0; for(int j = 0; j < n; j++) { if(input[j] == (math[temp] + '0')) { tem...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158099/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158099/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> #define rep(i, l, r) for (int i = l; i < r; i++) #define MAX 300001 int main(void) { int n; char s[MAX]; scanf("%d %s", &n, s); int count = 0; rep(ci, 0, 1000) { int c[3] = {ci / 100, (ci / 10) % 10, ci % 10}; int digit = 0; rep(si, 0, n) { if (c[digit...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158141/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158141/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(){ long long n; scanf("%lld",&n); printf("%lld",n*(n-1)/2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158192/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158192/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; scanf("%lld", &n); printf("%lld\n", ((n - 1) * n) / 2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158235/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158235/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(){ long long n,i; long long sum=0; scanf("%lld",&n); for(i=1; i<=n-1; i++){ sum+=i; } printf("%lld\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158279/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158279/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...
/*2019/08/25 */ #include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> #define MOD 1000000007 #define MIN 999999999 #define MAX -999999999 typedef long long int ll; typedef unsigned long long int ull; void llswap(ll *x,ll *y){ll temp;temp=*x;*x=*y;*y=temp;} void swap(int *x,int *y){int tmp;tmp=*x;*x=*...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158321/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158321/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 MAX(int a,int b){return a<b?b:a;} int main(){ int n,i,j,a,b,f[100010],q[100010],r,t; int ta[100010],to[200010],nt[200010],d[2][100010]; scanf("%d",&n); for(i=0;i<=n;i++)ta[i]=-1; for(i=0;i<n-1;i++){ scanf("%d %d",&a,&b); to[i]=b; nt[i]=ta[a]; ta[a]=i; to[i+n-1]=a; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158365/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158365/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...
typedef long unsigned int size_t; extern int printf (const char *__restrict __format, ...); extern int scanf (const char *__restrict __format, ...) ; extern int getchar (void); extern int putchar (int __c); int nextInt(){int f=0;char s=0;char c=getchar();while((c<48)||(57<c)){if(c==45){s=1;c=getchar();break;}c=getchar(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158415/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158415/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" @n = dso_local local_unname...
//set many funcs template //Ver.20180717 #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){i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158459/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158459/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> double triangle(int p1x,int p1y,int p2x,int p2y, int p3x, int p3y); int main(void){ double area=0; int n; scanf("%d",&n); int x1,y1,x2,y2,x3,y3; scanf("%d %d",&x1,&y1); scanf("%d %d",&x2,&y2); for(int i=2;i<n;i++){ scanf("%d %d",&x3,&y3); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158509/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158509/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<tgmath.h> int main() { long double a, b, c; scanf("%Lf%Lf%Lf", &a, &b, &c); long double e = 1.0e-14; if(sqrtl(a)+sqrtl(b)+e < sqrtl(c)) printf("Yes"); else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158552/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158552/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 a,b,c; scanf("%lld%lld%lld", &a,&b,&c); if(c-a-b <= 0) printf("No"); else if(2 * a * b < c*c+a*a+b*b-2*b*c-2*a*c) printf("Yes"); else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158602/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158602/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 argc, char const *argv[]) { char A[110]; char B[110]; for (int i = 0; i < 110; i++) { A[i] = 0; B[i] = 0; } scanf("%s", A); scanf("%s", B); int a = 0; if (strlen(A) > strlen(B)) { printf("GREATER\n"); }else if(strlen(A) < strlen(B)) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158697/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158697/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() { int t,n,k,l,m; scanf("%d",&t); for(l=1;l<=t;l++){ scanf("%d",&n); for(k=2;;k++){ m=pow(2,k)-1; if(n%m==0){ printf("%d\n",n/m); break; } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15874/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15874/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() { double a,b; scanf("%lf %lf",&a,&b); if(a>b) puts("GREATER"); else if(a==b) puts("EQUAL"); else puts("LESS"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158790/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158790/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() { double a, b; scanf("%lf", &a); scanf("%lf", &b); if(a > b) puts("GREATER"); else if(a < b) puts("LESS"); else if(a = b) puts("EQUAL"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158833/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158833/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() { double mov, dir; double x, y, d; while (scanf("%lf,%lf",&mov,&dir),mov != 0 || dir != 0) { x += sin(d*M_PI/180)*mov; y += cos(d*M_PI/180)*mov; d += dir; } printf("%d\n%d\n", (int)x, (int)y); return...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158891/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158891/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> #define PI 3.141592653589 int main() { double x = 0, y = 0; int d, a, angle = 90; int ans_x, ans_y; while (1) { scanf("%d,%d", &d, &a); if (d == 0 && a == 0) break; x += cos(angle * PI / 180.0) * d; y += sin(angle * PI / 180.0) * d; angle -= a...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158934/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158934/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 () { int a , b; double x = 0 , y = 0 , rad = 0 , tmp; while (1) { scanf("%d,%d,",&a,&b); if ( a == 0 && b==0 ) break; y += a * cos(rad / 180 * M_PI ); x += a * sin(rad / 180 * M_PI ); rad += b; } printf("%d\n%d\n",(int)x,(int)y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158992/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158992/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(void){ int i,j,k,l; int hypo,ang; int ang_tmp=0; double x,y; while(1){ scanf("%d,%d",&hypo,&ang); if(hypo==0&&ang==0)break; x+=sin(ang_tmp*3.14159265358/180)*hypo; y+=cos(ang_tmp*3.14159265358/180)*hypo; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159041/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159041/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( void ) { int s, t, dir = 90; double x = 0.0, y = 0.0, pi; pi = 4 * atan( 1.0 ); while ( scanf( "%d,%d", &s, &t ) && ( s != 0 || t != 0 ) ) { x += s * cos( ( double ) dir / 180 * pi ); y += s * sin( ( double ) dir / 180 * pi ); dir -= t; } printf( "%d...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159085/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159085/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 a, int b){ int r; while(b){ r = a%b; a = b; b = r; } return a; } int main(){ int a, b; scanf("%d %d", &a, &b); printf("%d\n", gcd(a, b)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159128/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159128/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> void swap(long *x, long *y); int main(){ long x, y, temp; scanf("%ld", &x); scanf("%ld", &y); if( x < y ){ temp = x; x = y; y = temp; } else{ //none } while(y>0){ temp = x % y; x = y; y = temp; } printf("%ld\n", x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159179/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159179/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 a,int b){ int r; if(a<b){ int t = a; a = b; b = t; } for(;;){ r=a%b; //printf("%d=%d??%d+%d\n",a,a/b,b,r); a = b; b = r; if(r==0)break; } return a; } int main (void){ int a,b; scanf("%d %d",&a,&b); printf("%d\n",gcd(a,b)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159265/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159265/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...
/* * Argorithms and Data Structures * Lectuire 1 * Greatest Common Divisor */ #include <stdio.h> #define Swap_int(a,b) { int temp = a; a = b; b = temp; } int main(void){ int x, y, d; scanf("%d %d", &x, &y); if( x < y) Swap_int(x,y); while( y > 0){ d = x % y; x = y; y = d; } printf("%d\n", x); r...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159308/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159308/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,temp,r; scanf("%d%d",&x,&y); if(x < y){ temp = x; x = y; y = temp; } while((r = x%y) != 0){ x = y; y = r; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159359/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159359/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, n; scanf("%d%d", &a, &b); while((n = a % b) != 0){ a = b; b = n; } printf("%d\n", b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159401/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159401/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 argc, char *argv[]) { int a, b, tmp; int mod = 1; scanf("%d", &a); scanf("%d", &b); if (a < b) { tmp = a; a = b; b = tmp; } while (mod > 0) { mod = a % b; a = b; b= mod; } printf("%d\n", a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159445/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159445/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 a, int b) { while (b > 0) { int n; n = a % b; a = b; b = n; } return a; } int main() { int a, b, c; scanf ("%d %d", &a, &b); c = gcd(a, b); printf("%d\n", c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159489/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159489/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> // 2????????´??°?????\??????????????¢??° void swapper(int *x, int *y) { int buf; buf = *y; *y = *x; *x = buf; } int main(void) { int x, y, r; scanf("%d %d", &x, &y); if (x < y) swapper(&x, &y); // ??????x>y??§????????????????????? r = x % y; while (r != 0) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159531/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159531/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,r; scanf("%d%d",&x,&y); while(y != 0){ r = x % y; x = y; y = r; } printf("%d\n",x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159575/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159575/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,r,tmp; scanf("%d%d",&a,&b); if(a<b){ tmp=a; a=b; b=tmp; } while(b>0){ r=a%b; a=b; b=r; } printf("%d\n",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159618/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159618/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,r,tmp; scanf("%d",&x); scanf("%d",&y); if(x<y){ tmp = x; x=y; y=tmp; } r = x%y; while(r!=0){ x=y; y=r; r=x%y; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159669/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159669/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, min, max, rem; scanf("%d %d", &x, &y); if(x == y){ printf("%d\n", x); return 0; } if(x < y){ min = x; max = y; }else{ min = y; max = x; } while(min > 0){ rem = max%min; max =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159711/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159711/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> long long int main(){ long long int t=0; scanf("%lld",&t); while(t--){ long long int n=0; long long int k=2; long long int x=0; scanf("%lld",&n); while(n%(long long int)(pow(2,k)-1)!=0){ k++; } x=n/(pow(2,k)-1); printf("%lld\n",x); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15977/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15977/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() { long long int t; scanf("%lld",&t); while(t--){ long long int n,i,k=0,sum1=0,sum2=0,o=1; scanf("%lld",&n); if(n==2) printf("NO\n"); if(n>2&&(n/2)%2==1) printf("NO\n"); if((n/2)%2==0){ printf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15982/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15982/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){ int x,y,res; scanf("%d",&x); scanf("%d",&y); if(y>=x){ res=x; x=y; y=res; } res=x%y; while(res!=0){ x=y; y=res; res=x%y; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159863/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159863/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,int); int main(void) { int x,y; int ans; int tmp; scanf("%d%d",&x,&y); printf("%d\n",gcd(x,y)); return 0; } int gcd(int x,int y) { if(x<y) return gcd(y,x); if(x%y==0) return y; else return gcd(y,x%y); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159913/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159913/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; scanf("%d%d",&a,&b); while((c=a%b)!=0){ a=b; b=c; } printf("%d\n",b); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159964/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159964/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 LIMITATION 1000000000 int gcd(int a, int b); int main(int argc, char** argv) { int a, b; int readScan = scanf("%d %d", &a, &b); if (readScan == EOF) { printf("data not enough! \n"); return(EXIT_FAILURE); } if (readScan != ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160005/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160005/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, r, m; scanf("%d%d", &x, &y); if( x < y ){ m = x; x = y; y = m; } r = x % y; while(r!=0){ x = y; y = r; r = x % y; } printf("%d\n", y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160049/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160049/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){ return y ? gcd(y, x % y) : x; } int main(){ int a,b; scanf("%d %d", &a, &b); printf("%d\n", gcd(a,b)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160092/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160092/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, s, t; scanf("%d %d", &s, &t); if(s < t){ i=s; s=t; t=i; } n= s%t; while(n!=0){ s = t; t = n; n = s % t; } printf("%d\n", t); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160135/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160135/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,z; scanf("%d %d",&a,&b); while((z=a%b) != 0){ a=b; b=z; } printf("%d\n",b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160179/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160179/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,box1; scanf("%d%d",&a,&b); if(a<=b){ box1=a; a=b; b=box1; } while(1){ c=a%b; if(c==0){ printf("%d\n",b); break; } else{ a=b; b=c; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160221/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160221/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, tmp, num, amari; scanf("%d%d", &x, &y); if (x < y) { tmp = x; x = y; y = tmp; } num = x % y; //numとyの最大公約数を求める。 while (num != 0) { amari = y % num; y = num; num = amari; if (amari...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160294/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160294/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> //xとy/最大公倍数返す int gcd(int x, int y){ int a; if(y<x){ a=x; x=y; y=a; } while(1){ a=y%x; y=x; x=a; if(a==0)break; } return y; } int main(){ int x,y; scanf("%d%d",&x,&y);//INPUT printf("%d\n",gcd(x,y));//OUTPUT return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160344/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160344/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,int); int main(){ int x,y; scanf("%d %d",&x,&y); printf("%d\n",gcd(x,y)); return 0; } int gcd(int a,int b){ int ex,r; if( a < b ){ ex = a ; a = b; b = ex; } while( b > 0 ){ r = a % b; a = b; b = r; } return a; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160388/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160388/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,rem,cg; scanf("%d %d",&x,&y); if(x<y){ cg = x; x = y; y = cg; } rem = x % y; while(rem != 0){ x = y; y = rem; rem = x % y; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160430/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160430/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,i,gcd; scanf("%d %d",&x,&y); if(x < y){ i = x; x = y; y = i; } gcd = x % y; while(gcd != 0){ x = y; y = gcd; gcd = x % y; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160481/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160481/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,x,y,d; scanf("%d%d",&x,&y); if(y>x){ a=x; x=y; y=a; } d=x%y; while(d!=0){ x=y; y=d; d=x%y; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160524/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160524/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 main(void) { int x, y,result; scanf("%d %d", &x, &y); result = gcd(x, y); printf("%d\n", result); return 0; } int gcd(int x, int y) { int r, temp; if(x<y) { temp = x; x = y; y = tem...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160568/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160568/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 a, int b); int main(void){ int x, y; scanf("%d %d", &x, &y); printf("%d\n", gcd(x, y)); return 0; } int gcd(int a, int b){ int A=0; if(b<=a){ if(a%b==0){ //printf("1%d %d\n", a, b); return b; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160610/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160610/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 research(int x, int y){ int n; while(1){ n = x % y; x = y; y = n; if(x % y == 0){ return y; } } } int main(void){ int x, y, z; scanf("%d %d", &x, &y); if(x > y){ z = research(x, y); }else if(y > x){ z...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160661/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160661/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,z,tmp; int gcd; scanf("%d %d", &x,&y); if(x<y){ tmp=x; x=y; y=tmp; } while((z = x % y) != 0) { x = y; y = z; z=x%y; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160704/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160704/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> void euqlid(int,int); int main(){ int x, y, n; scanf("%d%d",&x,&y); if(x<y){ n=x; x=y; y=n; } euqlid(x,y); return 0; } void euqlid(int x,int y){ int n; n=x%y; while(n!=0){ x=y; y=n; n=x%y; } printf("%d\n",y); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160755/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160755/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 M 10*10*10*10*10*10*10*10*10 int gcd(int x,int y); int swap(int x,int y); int main(){ int x,y; int d; scanf("%d%d",&x,&y); if(x<1 || y>M) exit(1); d = gcd(x,y); printf("%d\n",d); return 0; } int gcd(int x,int y){ int r; if(x<y){ swap(x,y); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160799/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160799/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,z,temp; scanf("%d%d",&x,&y); if(x < y){ temp = x; x = y; y = temp; } z = x % y; while(z != 0) { x = y; y = z; z = x % y; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160849/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160849/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, y, r, tmp; scanf("%d%d", &x, &y); if (x < y) { tmp = x; x = y; y = tmp; } while(1){ r = x % y; if (r == 0){ break; } x = y; y = r; } printf("%d\n", y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160892/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160892/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 t; scanf("%d", &t); while(t--){ int n, a, b; scanf("%d", &n); if(n%3==0){ a=n/3; b=n/3; } else if(n%3==1){ a=n/3+1; b=n/3; } else{ a=n/3;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16095/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16095/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() { int t; scanf("%d",&t); while(t--) { int s; scanf("%d",&s); int i=1; int count=0; while(s>i) { s = s-i; count++; i = i+2; } printf("%d\n",count+1); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1610/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1610/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 co...
#include <stdio.h> #include <string.h> #include <stdbool.h> #include <stdint.h> #include <stdlib.h> #include <limits.h> #include <math.h> int acs(const void *a, const void *b) { return *(int *)a - *(int *)b; } /* 1,2,3,4.. */ int des(const void *a, const void *b) { return *(int *)b - *(int *)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161064/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161064/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(void) { char s[11]; int a[9],b; scanf("%s",s); a[0]=(s[0]-48)*1e7; a[1]=(s[1]-48)*1e6; a[2]=(s[2]-48)*1e5; a[3]=(s[3]-48)*1e4; a[4]=(s[5]-48)*1e3; a[5]=(s[6]-48)*1e2; a[6]=(s[8]-48)*1e1; a[7]=(s[9]-48)*1; b=a[0]+a[1]+a[2]+a[3]+a[4]+a[5]+a[6]+a[7]; if...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161107/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161107/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...