Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> #include <math.h> int main(int argc, const char * argv[]) { int n=0; int s[1000]; int sum; //平均算出用 double sn; //平均 double aa_sum; //分散計算用 double aa; //分散 double a; //標準偏差 while (1) { sum=0; aa=0; a=0; scanf("%d", &n); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_175199/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_175199/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 n,i; double s[1000]; double a2,m; while(1) { m=0; a2 = 0; scanf("%d" , &n); if(n == 0) { break; } for(i=0;i<n;i++) { scanf("%lf", &s[i]); m=m+s[i]; //printf("m[%d] = %lf\n",i ,m); } m=m/n; for...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_175241/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_175241/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 NEW(p,n){p=malloc((n)*sizeof(p[0]));if(p==NULL){printf("not enough memory\n");exit(1);};} //pの型の変数n個の要素分のメモリを確保し、そのアドレスをpに代入するマクロ #define MAX(a, b) ((a) > (b) ? (a) : (b)) #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define SWAP(type, x, y...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_175292/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_175292/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 X, i, t = 0; scanf("%d", &X); for ( i = 1; i <= X; i++ ){ t += i; if ( t >= X ){ break; } } printf("%d\n", i); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_175335/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_175335/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,i=0,sum=0; scanf("%d",&X); while(sum<X){ sum+=i; i++; } printf("%d\n",i-1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_175379/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_175379/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 size_of_table, size_of_dataset, i, j; char input; for(;;) { scanf("%d", &size_of_table); if(size_of_table==0) break; char table[size_of_table][2]; for(i=0; i<size_of_table; i++) { scanf(" %c %c", &table[i]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_175429/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_175429/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, i, j; char a[1000], b[1000]; while(1){ scanf("%d",&n); if(n == 0)return 0; for(i = 0;i < n;i++){ scanf(" %c %c",a + i, b + i); } scanf("%d", &m); for(i = 0;i < m;i++){ char c; scanf(" %c",&c); for(j = 0;j < n;j++){ if(c == a[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_175487/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_175487/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 2751 Baseball // 2018.2.2 bal4u #include <stdio.h> #define M 1000000007 #define N 4000000 int fact[N+2], inv[N+2], factinv[N+2]; //#define getchar_unlocked() getchar() int in() { int n = 0; int c = getchar_unlocked(); do n = (n<<3)+(n<<1) + (c & 0xf), c = getchar_unlocked(); while (c >= '0'); return n;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_175559/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_175559/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._IO_FILE = type { i...
#include <stdio.h> int main(void){ int i; char st,al[53] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; do{ scanf("%c", &st); for(i=0;i<52;i++) if(al[i] == st){ st = al[ (i+26)%52 ]; break; } printf("%c", st); }while(st != '\n'); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_175609/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_175609/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.al = private ...
#include <stdio.h> #include <math.h> int gcd(int a, int b) { return b ? gcd(b, a%b) : a; } int nok(int a, int b) { return (a / gcd(a, b)) * b; } int main(int argc, const char * argv[]) { int n, m, z; scanf("%d %d %d", &n, &m, &z); printf("%d\n", z / nok(n, m)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17566/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17566/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 <ctype.h> int main(void) { char c; int i; i = 'a'-'A';//???????????? for(;;){ scanf("%c",&c); if ('a' <= c && c<= 'z') printf("%c",c-i); else if ('A' <= c && c<= 'Z') printf("%c",c+i); else if (c == '...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_175724/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_175724/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 ll long long void swap(ll *a, ll *b){ ll t = *a; *a = *b; *b = t; return; } int main(){ int n; scanf("%d", &n); ll a[n + 1]; int i; for(i = 1 ; i <= n ; i++) scanf("%lld", &a[i]); for(i = 1 ; i <= (n + 1) / 2 ; i += 2) swap(&a[i], &a[n - i + 1]); for(i = 1 ; i <= n ; i++) printf("%ll...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17579/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17579/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 str[1200] = {0} ; int i=0 ; fgets(str ,sizeof str ,stdin); for (i=0 ;i<1200 ;i++){ if (str[i]=='\n') break; if (str[i]>='A' && str[i]<='Z'){ str[i]=str[i]+32; } else if (str[i]>='a' && str[i]<='z'){ str[i]=str[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_175854/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_175854/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> static char cs[256]; // chars void init(void) { int i; for (i = 0; i < 256; ++i) { cs[i] = i; if (i >= 'A' && i <= 'Z' || i >= 'a' && i <= 'z') cs[i] ^= 0x20; } } int main(void) { int c; init(); while ((c = getchar()) != EOF) putchar(cs[c]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_175911/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_175911/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" @cs = internal unnamed_addr...
#include<stdio.h> #include<string.h> int main(){ char s[1200]; int n; scanf("%[^\n]",s); for(n=0;n<=strlen(s);n++){ if(s[n]>=97&&s[n]<=122){ s[n]=s[n]-32; }else if(s[n]>=65&&s[n]<=90){ s[n]=s[n]+32; } } printf("%s\n",s); re...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_175955/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_175955/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[2048]; int i; fgets(s, sizeof(s), stdin); for(i = 0; s[i] != '\0'; i++) { if('a' <= s[i] && s[i] <= 'z') s[i] += 'A' - 'a'; else if('A' <= s[i] && s[i] <= 'Z') s[i] += 'a' - 'A'; } printf("%s",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176004/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176004/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 ch[1200]; int i,n; n=0; char a[1200]; while(1) { scanf("%c",&a[n]); if(a[n] == '\n') { break; } ch[n] = a[n]; if('A' <= a[n] && a[n] <= 'Z') { ch[n] = a[n] + 32; } else if(a[n] >= 'a' && a[n] <= 'z') { ch[n] = a[n] - 32; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176048/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176048/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 <ctype.h> #define N 1200 int main(){ int i; char s[N]; scanf("%[^\n]", s); for(i = 0; i < strlen(s); i++){ if(isupper(s[i]) != 0) s[i] = tolower(s[i]); else if(islower(s[i]) != 0) s[i] = toupper(s[i]); printf("%c", s[i]); } printf("\...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176091/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176091/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 <ctype.h> int main(void){ int i; char m[1200]={0}; scanf("%[^\n]",m); for(i=0;i<1200;i++){ if(isalpha(m[i])){ if(islower(m[i])){ m[i]=toupper(m[i]); }else if(isupper(m[i])){ m[i]=tolower(m[i]); } } } printf("%s\n",m); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176141/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176141/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){ while(1){ char c = getchar(); if(c==EOF) break; if('a'<=c && c<='z') printf("%c", c+'A'-'a'); else if('A'<=c && c<='Z') printf("%c", c+'a'-'A'); else putchar(c); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176185/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176185/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() { char c; for(;~scanf("%c",&c);putchar(64<c&&c<91?c+32:96<c&&c<123?c-32:c)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176228/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176228/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 a; while(1){ scanf("%c", &a); if(a >= 'a' && a <= 'z'){ a = a - 32; }else if(a >= 'A' && a <= 'Z'){ a = a + 32; } printf("%c", a); if(a == '\n') break; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176271/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176271/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 <ctype.h> int main() { char ch[1200]; int i,n; n=0; char a[1200]; while(1) { scanf("%c",&a[n]); if(a[n] == '\n') { break; } ch[n] = a[n]; if('A' <= a[n] && a[n] <= 'Z') { ch[n] = a[n] + 32; } else if(a[n] >= 'a' && a[n] <= 'z') { ch[n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176321/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176321/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 h,w,k; int i,j; int c,d; int ans=0; int b; char s[6][6]; scanf("%d%d%d",&h,&w,&k); for(i=0;i<h;i++){ scanf("%s",s[i]); } for(c=0;c<(1<<h);++c){ for(d=0;d<(1<<w);++d){ b=0; for(i=0;i<h;i++){ for(j=0;j<w;j++){ if( !(c&(1<<i)) &&...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176365/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176365/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 h,w,k; char c[7]; int table[6][6]={{0}}; int a[6]={0}; int b[6]={0}; int num; int ans=0; int i,j; scanf("%d %d %d",&h,&w,&k); for(i=0;i<h;i++) { scanf("%s",c); for(j=0;j<w;j++) { if(c[j]=='#') { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176415/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176415/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[4]; int d[4]={1,1,1},c=1; scanf("%s",S); for(int i=0;i<3;i++){ if(d[S[i]-'a']!=1) c=0; d[S[i]-'a']--; } if(c==1) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176459/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176459/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.d = private u...
#include<stdio.h> int main(){ char s[4]; int a=0,b=0,c=0,i; scanf("%s",&s); for(i=0;i<3;i++){ if(s[i]=='a' && a==0){ a=1;} if(s[i]=='b' && b==0){ b=1;} if(s[i]=='c' && c==0){ c=1; } } if(a==1&&b==1&&c==1){ printf("Yes"); } else{ printf("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176501/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176501/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[3]; int n; scanf("%s",s); if(s[0]!=s[1]){ if(s[1]!=s[2]){ if(s[2]!=s[0]){ puts("Yes"); } else puts("No"); } else puts("No"); } else puts("No"); return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176545/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176545/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, b, c; scanf("%c%c%c", &a, &b, &c); if(a * b * c == 'a' * 'b' * 'c') printf("Yes"); else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176589/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176589/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[3]; int i; for(i = 0 ; i < 3 ; i++){ scanf("%s",&S[i]); } int a = 0 , b = 0 , c = 0 ; for(i = 0 ; i < 3 ; i++){ if(S[i] == 'a') a++; if(S[i] == 'b') b++; if(S[i] == 'c') c++; } if(a == 1&&b == 1&&c == 1) printf("Yes"); else printf("No"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176639/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176639/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 flag[3]={},i; char s[3]; scanf("%s",s); for(i=0;i<3;i++){ if(s[i]=='a') flag[0]=1; else if(s[i]=='b') flag[1]=1; else if(s[i]=='c') flag[2]=1; } if(flag[0]==1&&flag[1]==1&&flag[2]==1) printf("Yes\n"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176682/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176682/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 a[3]={}; int b[3]={}; int i; int j=0; if(scanf("%c",&a[0])==1); if(scanf("%c",&a[1])==1); if(scanf("%c",&a[2])==1); for(i=0;i<3;i++){ if(a[i]=='a')b[0]++; if(a[i]=='b')b[1]++; if(a[i]=='c')b[2]++; } for(i=0;i<3;i++){ if(b[i]!=1)j=1; } if(j==...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176725/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176725/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> typedef long long ll; #define rep(i,a,b,c) for(ll i=(a);i<(b);i+=(c)) ll gcd(ll a, ll b){if(a%b==0)return b;else gcd(b,a%b);} int main(void){ ll N; scanf("%lld",&N); ll A[N+1]; rep(i,0,N,1){ scanf("%lld",&A[i]); } ll ans=gcd(A[0],A[1]); rep(i,2,N,1){ ans=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176783/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176783/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(long int, long int); int main(){ int N, i; long int A[100000], X[100000], max=0; scanf("%d", &N); for(i=0; i<N; i++) scanf("%ld", &A[i]); X[0] = 0; for(i=0; i<N; i++){ X[i+1] = gcd(X[i], A[i]); } printf("%ld\n", X[i]); retur...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176826/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176826/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,z; scanf("%d",&n); int a[n]; for (int i=0;i<n;i++){ scanf("%d",&a[i]); } for (int i=1;i<n;i++){ while (1){ if (a[i-1]<a[i]){ a[i]%=a[i-1]; if (a[i]==0){ a[i]=a[i-1]; break; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176877/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176877/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 main() { int n,m; int i,j,k,l,temp; int flag=0; char s1[200],s2[200],s3[200]; scanf("%s", s1); scanf("%s", s2); for (i=0; s1[i] !='\0' && flag==0; i++) { if (s1[i] > s2[i]) s3[i] = s2[i]; else if (s1[i] == s2[i]) s3[i] = s2[i]; else if ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17692/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17692/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> #include <stdlib.h> #include <stdint.h> // int64_t #define max(a,b) ((a) > (b) ? (a) : (b)) #define min(a,b) ((a) > (b) ? (b) : (a)) int get_str(char *str, int size) { char format[100]; if (size == 0) return 0; snprintf(format, sizeof(format), "%%%ds", size);...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177005/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177005/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 S_MAX (100000) #define Q_MAX (50000) void qsort(int *numbers, int left, int right); int main(void) { int i; int j; int n; int q; int s_sets[S_MAX]; int q_sets[Q_MAX]; int repetition; int tmp; scanf("%d", &n); for (i = 0; i < n; i++){ scanf("%d", &s_sets[i]); } scanf("%...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177049/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177049/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> void q_sort(int a,int b,int vec[]){ int temp,i,j; if(a>=b)return; if(b-a==1){ if(vec[a]<vec[b])return; else{ temp=vec[b]; vec[b]=vec[a]; vec[a]=temp; return; } } i=a; j=b; int p=vec[a]; while(1){ while(p>vec[i])i++; while(p<vec[j])j--; if(i>=j)break...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177092/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177092/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 C=0,Smax=0,Tmax=0,max,i,n,q,x,S[100000],T[50000],L[50001]; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&x); if(Smax<x)Smax=x; S[i]=x; } scanf("%d",&q); for(i=0;i<q;i++){ scanf("%d",&x); if(Tmax<x)Tmax=x; T[i]=x; } if(Smax<Tmax)max=Smax; else max=Tmax; for(i=0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177135/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177135/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(){ //puts("ok"); unsigned int S[10000000/32 +1]; unsigned int T[10000000/32 +1]; int n,q; int x; int i; for(i=0;i<10000000/32 +1;i++)S[i]=T[i]=0; //puts("ok"); scanf("%d\n",&n); for(i=0;i<n;i++){ scanf("%d",&x); S[x/32]=S[x/32]|(0x1<<x%32); } scanf("%d\n",&q); for(i=0;i<q;i++)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177193/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177193/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...
// ABC 149-D // 2019.12.29 bal4u #include <stdio.h> #include <ctype.h> #define gc() getchar_unlocked() int in() { // 非負整数の入力 int n = 0; int c; c = gc(); // do c = gc(); // while (isspace(c)); do n = 10 * n + (c & 0xf); while ((c = gc()) >= '0'); return n; } void ins(char *s) { // 文字列の入力 スペース以下の文字で入力終了 do *s ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177236/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177236/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._IO_FILE = type { i...
#include<stdio.h> int main(){ int n,k,r,s,p; scanf("%d %d",&n,&k); scanf("%d %d %d",&r,&s,&p); char t[n]; scanf("%s",t); int ans=0; for(int i=0;i<k;i++){ int tmp=i; char pre='a'; while(tmp<n){ if(t[tmp]!=pre){ switch (t[tmp]){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177287/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177287/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 arr[6][200010]; char str[200010]; char model[20]="abcacbbacbcacabcba"; int min(int x,int y) { return x<y?x:y; } inline int lowbit(int x) { return x&(-x); } void proc(int n) { int x; int m; for(int j=0;j<6;j++) { for(int i=1;i<=n;i++) { x=low...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17733/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17733/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" @model = dso_local local_unna...
#include <stdio.h> int main(void) { long a, b; scanf("%ld %ld", &a, &b); if (a <= 0 && 0 <= b) { printf("Zero\n"); return 0; } if (0 < a) { printf("Positive\n"); return 0; } if (a < 0 && b < 0) { if ((b - a + 1) % 2 == 0) printf("Positive\n"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177380/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177380/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; while(~scanf("%d%d",&a,&b)) { int f=0; if(a<=0&&b>=0) { printf("Zero\n"); } else if(a>0) { printf("Positive\n"); } else if(a<0&&b<0) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177423/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177423/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>0){ printf("Positive\n"); }else if(a<=0 && b>=0){ printf("Zero\n"); }else if(b<0){ if((b-a+1)%2==0){ printf("Positive\n"); }else{ printf("Negative\n"); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177467/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177467/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 testcase(); int main() { int t; scanf("%d", &t); for (int i = 0; i < t; i++) { testcase(); } return 0; } void testcase() { long long n; scanf("%lld", &n); if (n <= 6) { printf("15\n"); return; } else if (n <= 8) { printf("20\...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17751/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17751/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 a, b; while( scanf("%d %d", &a, &b) != EOF ){ printf("%d\n", a + b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177560/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177560/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; while ( scanf("%d %d",&A,&B) !=EOF ){ printf("%d\n",A+B); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177603/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177603/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; while(scanf("%d %d", &a, &b) != EOF) { printf("%d\n", a + b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177661/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177661/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 <limits.h> #define TEST_MODE 1 int main(void) { #if TEST_MODE long long a,b; while(scanf("%lld%lld",&a,&b)==2) { if(a+b>(long long)INT_MAX || a+b<(long long)INT_MIN)return 1; printf("%lld\n",a+b); } #else int a,b; while(scanf("%d%d",&a,&b)==2) { printf("%d\n",a+b); } #endif r...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177726/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177726/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 N = 200000; int n, m; int a[200000]; int f[400000]; int fr[400000]; long long ans; int shift = 200000; int max(int a, int b) { if (a > b) { return a; } else { return b; } } int min(int a, int b) { if (a < b) { return a; } else { return b; } } i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17777/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17777/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_unnamed_...
#include <stdio.h> int main() { int a=0,b=0; while(scanf("%d %d",&a,&b)!=EOF) { printf("%d\n",a+b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177827/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177827/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, a, n) for(ll i = ((ll) a); i < ((ll) n); i++) typedef long long ll; ll max(ll x, ll y, ll z) { if(x >= y && x >= z) return x; return y >= z ? y : z; } ll min(ll x, ll y, ll z) { if(x <= y && x <= z) return x; return y <= z ? y : z; } int main(void) { ll N; scanf("%lld", ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177870/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177870/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 H,W,i,j; scanf("%d %d",&H,&W); char a[101][101]; for(i=0;i<H;i++){scanf("%s",&a[i]);} for(i=-1;i<=H;i++){ if(i==-1||i==H){for(j=0;j<W+2;j++){printf("#");}} else{printf("#%s#",a[i]);} printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177913/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177913/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> char a[100][100]; int main(){ int H,W; scanf("%d %d",&H,&W); int i,j; for(i = 0;i<H;i++){ for(j = 0;j<W;j++){ scanf(" %c",&a[i][j]); } } for(i = 0;i<H+2;i++){ for(j = 0;j<W+2;j++){ if(i == 0 || i == (H+1)){ printf("#"); }else{ if(j == 0 || j == (W+1)){ printf("#")...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177957/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177957/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 m,n,i,j; char a[105][105]; while(scanf("%d%d\n",&m,&n)!=EOF) { for(i=0;i<m;i++) { for(j=0;j<n;j++) { scanf("%c",&a[i][j]); } getchar(); } for(j=0;j<n+1;j++) { printf("#"); } printf("#\n"); for(i=0;i<m;i++) { printf("#"); f...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178013/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178013/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,m,l,q,r; char ch[150][150]; while(scanf("%d%d",&a,&b)!=EOF) { getchar(); for(i=1;i<=a;i++) { for(j=1;j<=b;j++) scanf("%c",&ch[i][j]); getchar(); } for(m=1;m<=b+2;m++) printf("#"); printf("\n"); for(l=1;l<=a;l++) { printf("#"); for(q=1;q<=b;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178057/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178057/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 t,p=2050; scanf("%d",&t); while(t--) { long long int n,k=0,m; scanf("%lld",&n); if(n<p||n%p!=0) { printf("-1\n"); } else { m=n/p; while(m>0) { k+=m%10; m/=10; } printf("%lld\n",k); } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17810/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17810/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 h, w, i, j; char p[101][101], q[102][102]; scanf("%d %d", &h, &w); for(i = 0; i < h; i++) scanf("%s", p[i]); for(i = 0; i < h+2; i++){ for(j = 0; j < w+2; j++) q[i][j] = '#'; } for(i = 1; i <= h; i++){ for(j = 1; j <= w; j++) q[i][j] = p[i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178143/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178143/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,k,p[1000],i,j,a=0,c=0,b=0; scanf("%d %d",&n,&k); for(i=0;i<n;i++){ scanf("%d",&p[i]); b+=p[i]; } for(i=0;i<n-1;i++){ for(j=i+1;j<n;j++){ if(p[i]<p[j]){ a=p[j]; p[j]=p[i]; p[i]=a; } } } for(i=0;i<n-k;i++){ b-=p[i]; } printf("%d\n",b); return 0; }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178237/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178237/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, K, i, j; int p[1000]; int tmp, sum; scanf("%d %d", &N, &K); for (i=0; i<N; i++) { scanf("%d", &p[i]); } for (i=0; i<N; ++i) { for (j=i+1; j<N; ++j) { if (p[i] > p[j]) { tmp = p[i]; p[i] = p[j]; p[j] = tmp; } } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178280/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178280/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,k; scanf("%d %d",&n,&k); int i,j,s[n]; for(i=0;i<n;i++) scanf("%d",&s[i]); for(j=0;j<n;j++) for(i=0;i<n-1;i++) { if(s[i]>s[i+1]) { int b=s[i]; s[i]=s[i+1]; s[i+1]=b; } } int sum=0; for(i=0;i<k;i++) sum+=s[i]; printf("%d\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178330/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178330/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 <time.h> int main(void) { int n, k, p[1001],i,j,temp,sum = 0; scanf("%d %d",&n,&k); for(i=0;i<n;i++){ scanf("%d",&p[i]); } for(i=0;i<n-1;i++){ for(j=0;j<n-1;j++){ if(p[j]>p[j+1]){ temp = p[j]; p[j] = p[j+1]; p[j+1] = temp; } } } for(i=0;i<k...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178374/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178374/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,k; scanf("%d%d",&n,&k); int i; int p[n]; for(i=0;i<n;i++){ scanf("%d",&p[i]); } int tmp=0; int j=0; for(i=0;i<n;i++){ for(j=i+1;j<n;j++){ if(p[i]>p[j]){ tmp=p[i]; p[i]=p[j]; p[j]=tmp; } } } int sum=0; for(i=0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178417/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178417/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 p[1001],n,k,i,tmp,j,sum=0; scanf("%d%d",&n,&k); for(i=0;i<n;i++) scanf("%d", &p[i]); for (i=0; i<n; ++i) { for (j=i+1; j<n; ++j) { if (p[i] > p[j]) { tmp = p[i]; p[i] = p[j]; p[j] = tmp; } } } for(i=0;i<k;i+...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178460/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178460/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> #include<stdlib.h> #include<limits.h> #define MOD 1000000007 #define PI 3.14159265 #define seive_len 1 typedef long long int lli; int *array; int seive[seive_len]; long long int min(long long int a, long long int b) { return a<b?a:b; } long long int max(long...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178503/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178503/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" @array = dso_local local_un...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.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)) #define bit(n,m)(((n)>>(m))&1)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178547/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178547/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 M = 0; scanf("%ld", &M); printf("%d\n", 48 - M); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178677/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178677/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 SQ(x) ((x) * (x)) #define EPS 1e-5 typedef struct { double x; double y; } POINT; int dist(POINT a, POINT b, double d) { if (sqrt(SQ(a.x - b.x) + SQ(a.y - b.y)) - d > EPS){ return (0); } return (1); } int max(int a, int b) { if (a > b){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178857/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178857/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.POINT = type { doub...
#include <stdio.h> #include <string.h> void op_print(char *str, int a, int b) { for(int i = a; i <= b; ++i) { putchar(str[i]); } putchar('\n'); } void op_replace(char *str, int a, int b, char *p) { for(int i = a; i <= b; ++i) { str[i] = p[i - a]; } } void op_reverse(char *str, int a, int b) { for(; a < b...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178943/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178943/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,str[1000],order[10],buf[1000],data[1000]; int q,a,b,i,j,k=0; char *res; scanf("%s",str); scanf("%d",&q); for(i=0;i<q;i++) { scanf("%s",order); if(strcmp(order,"print")==0) { scanf("%d %d",&a,&b); strncpy(buf,a+str,b-a+1); buf[b-a+1]='\0'; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178994/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178994/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 <string.h> #include <stdio.h> void print(char str[1000], int a, int b){ int i; for(i=a; i<=b; i++){ printf("%c",str[i]); } printf("\n"); } void reverse(char str[1000], int a, int b){ int i; char copy[1000]; strcpy(copy,str); for(i=0; i<=b-a; i++){ str...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179043/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179043/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.2 = private unnamed_a...
#include<stdio.h> int main() { int i,j,k,n,x,y; char str[1000]; char rev[1000]; char command[10]; int length; i=0; while(1) { scanf("%c",&str[i]); if(str[i]=='\n') break; i++; } length=i; scanf("%d",&n); for(i=0;i<n;i++) { j=0; while(1) { scanf("%c",&c...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179087/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179087/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 <stdlib.h> #include <stdio.h> #include <string.h> #include <ctype.h> int main(){ char str[1000]; int num; char op[100]; int i, j; int s, f; char re[1000]; char replace[] = "replace"; char reverse[] = "reverse"; char print[] = "print"; scanf("%s", str); scanf("%d", &num); for(i=0; i<num; i++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179137/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179137/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.print = priva...
#include <stdio.h> #include<string.h> int main (int argc, char * argv[]) { char str[1000];//文字列 char c[1000]; int d; int q;//命令の数 int a,b;//命令の範囲 scanf("%s",str); scanf("%d",&q); for(int i=0;i<q;i++){ scanf("%s %d %d",c,&a,&b); if(c[2] == 'i'){ // printf("表示\n"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179188/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179188/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...
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <string.h> int main(void) { char str[1001] = { 0 }; int q = 0; int a = 0; int b = 0; char p[1001] = { 0 }; char result[100][1001]; int printCount = 0; scanf("%1000s%*[^\n]%*c", &str); scanf("%d%*[^\n]%*c", &q); int i = 0; for (i = 0; i < q; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179230/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179230/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> char str[1005]; char p[1005]; int main() { int q, a, b; char op[10], *x, *y, c; scanf("%s%d", str, &q); while (q--) { scanf("%s%d%d", op, &a, &b); if (op[2] == 'i') { // print b++, c = *(str+b), *(str+b) = 0, puts(str+a), *(str+b) = c;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179274/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179274/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 - ITP1_9_d Date: 20181009 Author: Mikoron * ♡mikoiwate_351♡ */ #define STRMAX 1001 #define COMMAX 11 #include<stdio.h> #include<string.h> int main(void) { char words[STRMAX], com[COMMAX], replace[STRMAX]; short i, j, com_num, a, b; scanf("%s", words); scanf("%hd", &com_num); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179317/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179317/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> // printf(), putchar(), scanf() int main(int argc, char **argv) { short puzzle[9][9]; char check[9][9]; int n; enum {none, done, dupli} state[9]; scanf("%d", &n); for (int u = 0; u < n; ++u) { for (int y = 0; y < 9; ++y) { for (int x = 0; x < 9; ++x) scanf("%hd", &puzzle[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179368/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179368/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<unistd.h> char s[1111]; int main(){ int l = read(0, s, 1111); if(s[l-2]=='s'){ l++; s[l-2] = 'e'; } s[l-1] = 's'; write(1, s, l); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179425/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179425/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" @s = dso_local global [1111...
#include<stdio.h> #include<math.h> #include<stdlib.h> #include<string.h> int main(void){ char s[1001]; int len; scanf("%s", s); len=strlen(s); if(s[len-1]=='s'){ printf("%ses\n", s); } else printf("%ss\n", s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179490/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179490/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> typedef long long ll; int main() { char s[1005]; scanf("%s", s); int l = strlen(s); if (s[l-1] == 's') { printf("%ses", s); } else { printf("%ss", s); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179533/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179533/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) { float n,w,temp; int i; scanf("%f",&n); while(n>=0){ w=128; temp=n; for(i=0;i<=11;i++){ if(w<=n){ n-=w; } w/=2; } if(n>0){ printf("NA\n"); } else { w=128; n=temp; for(i=0;i<=11;i++){ if(w<=n){ n-=w; printf("1"); } else { pri...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179591/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179591/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> #define N 20 const struct { char s[ 8 ]; int p; } d[ N ] = { { "yotta", 24 }, { "zetta", 21 }, { "exa", 18 }, { "peta", 15 }, { "tera", 12 }, { "giga", 9 }, { "mega", 6 }, { "kilo", 3 }, { "hecto", 2 }, { "deca", 1 }, { "deci", -1 }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179641/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179641/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.anon = type { [8 x ...
#include <stdio.h> typedef int kamei; typedef long long int kameikameikamei; kamei main(void) { kamei n, a; static kamei t[2000000]; scanf("%d %d", &n, &a); for (kamei i = 0; i < n; i++) { scanf("%d", &t[i]); } kameikameikamei sum = 0; kamei cnt = 0; kamei csum = 0; kamei tmp...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179692/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179692/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" @main.t = internal global [...
#include <limits.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> #include <math.h> #define P 1000000007 int comp(const void *a, const void *b){return *(int*)a-*(int*)b;} int main(void){ char s[51]; char *t="AKIHABARA"; scanf("%s", s); int i=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179742/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179742/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.1 = private unnamed_a...
#include<stdio.h> int main(){ int n,m,b,i,j; int N[10][7]={ {0,1,1,1,1,1,1}, {0,0,0,0,1,1,0}, {1,0,1,1,0,1,1}, {1,0,0,1,1,1,1}, {1,1,0,0,1,1,0}, {1,1,0,1,1,0,1}, {1,1,1,1,1,0,1}, {0,1,0,0,1,1,1}, {1,1,1,1,1,1,1}, {1,1,0,1,1,1,1} }; while(1){ scanf("%d",&n); if(n==...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179786/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179786/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.N = private u...
#include <stdio.h> int main(void) { int A, B, C, D, E, F; int A100, B100; int a, b, c, d; double ratio; double max_ratio = -1, current_ratio; int max_sugar, max_water; scanf("%d %d %d %d %d %d", &A, &B, &C, &D, &E, &F); A100 = A * 100; B100 = B * 100; ratio = (double)E / (100.0 + E); for (a = 0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179829/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179829/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,c=0,q,x=0,y=0; scanf("%d %d",&a,&q); int i,d,j,t,f; int b[a],e[a]; for(i=0;i<a;i++) { scanf("%d",&b[i]); if(b[i]==1) { x++; } } c=q; while(1) { if(c==0) { break; } scanf("%d %d",&d,&f); if(d==1) { b[f-1]=1-b[f-1]; if(b[f-1]==1) {...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17988/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17988/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 k, a, b; scanf("%d", &k); a = (b = k / 2) + k % 2; printf("%d\n", a * b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179922/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179922/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 k; scanf("%d",&k); int count = 0; for(int i = 1;i <= k;i += 2){ for(int j = 2;j <= k;j += 2){ count++; } } printf("%d",count); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179973/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179973/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 a; scanf("%d",&a); if (a % 2 == 0) { printf("%d",a/2 * a/2); } else { printf("%d", a/2 * (a/2 + 1)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180021/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180021/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 k; int i; int s = 0; scanf("%d", &k); for(i=2;i<=k;i++){ s += i / 2; } printf("%d\n", s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180065/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180065/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 k; scanf("%d",&k); printf("%d",k/2*((k+1)/2)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180108/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180108/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 k; int aa=0; scanf("%d",&k); for(int i=1;i<k;i++){ if(i+1<=k)aa+=1; for(int j=i+1;j<k;j+=2){ if(j+2<=k)aa+=1; } } printf("%d\n",aa); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180166/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180166/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...
/* 結果: */ #define _USE_MATH_DEFINES #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <limits.h> #include <stdbool.h> #define inf (INT_MAX-1) #define INF 9223372036854775807 #define EPS 1e-10 #define sq(n) ((n)*(n)) #define rep(i,n) for(i=0;i<n;i++) #define rev(i,n) for(i=n-1;i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180209/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180209/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> long long int gcd(long long int a, long long int b) { if(a%b == 0) { return b; }else { return gcd(b, a%b); } } long long int lcm(long long int a,long long int b) { return a*b / gcd(a, b); } int main(void) { long long int a,b,x; scanf("%lld %lld",&a,&b); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180252/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180252/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 A,B,i; scanf("%ld %ld", &A,&B); for (i = 1; i <= B; i++) { if ((i*A) % B == 0) { printf("%ld", i*A); return 0; } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180296/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180296/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...