Source_Code stringlengths 69 484k | IR_Original stringlengths 2.05k 17.9M |
|---|---|
#include <stdio.h>
int main() {
char name[101], ans[200], type;
int n, a;
while(1) {
scanf("%s %c", name, &type);
if(type == 'X') { break; }
n = 0;
a = 0;
if(type == 'U') {
while(name[n] != '\0') {
if(n == 0 && 'a' <= name[0] && name[0] <= 'z') {
ans[0] = name[0] - 32;
n ++;
a +... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_117540/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_117540/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 sheep;
int wolf;
scanf("%d %d",&sheep,&wolf);
if(wolf>=sheep){
printf("unsafe\n");
} else {
printf("safe\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_117591/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_117591/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 S,W;
scanf("%d %d",&S,&W);
if(W<S)printf("safe");
else printf("unsafe");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_117634/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_117634/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 s,w;
scanf("%d %d",&s,&w);
if(s<=w){
printf("unsafe\n");
}
else{
printf("safe\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_117685/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_117685/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 S,W;
scanf("%d %d",&S,&W);
if(S<=W)
printf("unsafe");
else
printf("safe");
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_117728/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_117728/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void)
{
int a,b;
scanf ("%d",&a);
scanf ("%d",&b);
if(a<=b)
printf("unsafe");
else
printf("safe");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_117771/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_117771/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 s,w;
char line[10];
fgets(line,sizeof(line),stdin);
sscanf(line,"%d%d",&s,&w);
if(w>=s){
printf("unsafe");
return 0;
}
printf("safe");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_117814/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_117814/source.c"
target datalayout = "e-m:e-p270: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){
int i,j;
scanf("%d%d", &i,&j);
if(i>j)
printf("safe");
else
printf("unsafe");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_117865/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_117865/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 s,w;
scanf("%d %d",&s,&w);
if(s <= w)
printf("unsafe\n");
else
{
/* code */ printf("safe\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_117915/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_117915/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 s ,w ;
scanf("%d %d",&s,&w);
if(w>=s)
printf("unsafe\n");
else
printf("safe\n");
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_117959/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_117959/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 S,W;
scanf("%d%d",&S,&W);
if(S>W)
printf("safe\n");
else
printf("unsafe\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_118000/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_118000/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 s,w,dummy;
dummy=scanf("%d %d",&s,&w);
if(s>w){printf("safe");}
else {printf("unsafe");}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_118044/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_118044/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 s,w;
scanf("%d %d",&s,&w);
if(s>w){
printf("safe");
}
else{
printf("unsafe");
}
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_118088/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_118088/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 S,W;
scanf("%d", &S);
scanf("%d", &W);
if(W>=S){
printf("unsafe");
}
else{
printf("safe");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_118130/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_118130/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 S,W;
scanf("%d %d",&S,&W);
if(S>W){
printf("safe\n");
}
if(S<=W){
printf("unsafe\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_118174/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_118174/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
int main()
{
long long int i,j,k;
long long int N,M;
long long int space;
scanf("%lld %lld",&N,&M);
if( N > M ){
printf("safe\n");
}
else{
printf("unsafe\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_118217/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_118217/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 s, w;
scanf("%d %d", &s, &w);
if(w < s){
printf("safe");
}else{
printf("unsafe");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_118260/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_118260/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 s,w;
scanf("%d %d",&s,&w);
if(s<=w){
printf("unsafe\n");
}else{
printf("safe\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_118303/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_118303/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 s, w;
scanf("%d%d", &s, &w);
if(s <= w) {
printf("unsafe");
} else {
printf("safe");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_118347/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_118347/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
int n,m,a[100];
int i,c=0;
double x=0;
scanf("%d %d",&n,&m);
for(i=0;i<n;i++){
scanf("%d",&a[i]);
x+=a[i];
}
x=x/(4*m);
for(i=0;i<n;i++){
if(x<=a[i]){
c++;
}
}
if(m<=c){
printf("Yes\n");
}
else{
printf("No\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_118390/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_118390/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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, i, ans = 0, cnt = 0;
int a[1000];
scanf("%d %d", &N, &M);
for(i = 0; i < N; i++){
scanf("%d", &a[i]);
}
for(i = 0; i < N; i++){
ans = ans + a[i];
}
for(i = 0; i < N; i++){
if(a[i] >= ans / (4.0 * M))... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_118433/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_118433/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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()
{
float m,n,ar[200005],sum=0.0;
scanf("%f %f",&n,&m);
for(int i=0;i<n;i++){
scanf("%f",&ar[i]);
sum+=ar[i];
}
float a=sum/(m*4);
int cnt=0;
for(int i=0;i<n;i++)
{
if(ar[i]>=a)
cnt++;
}
if(cnt>=m)
printf("Ye... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_118477/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_118477/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char *argv[]) {
int n, a, b, c;
scanf("%d%d%d%d", &n, &a, &b, &c);
n -= 1;//
if(n == 0){
printf("0\n");return 0;
}
if(a > b){
a = a + b;
b = a - ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_11852/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_11852/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 <stdlib.h>
#include <string.h>
#include <math.h>
int main(void){
int n,m;
int a[105];
int sum=0;
int yes=0;
double summ;
scanf("%d %d",&n,&m);
for(int i=0;i<n;i++){
scanf("%d",&a[i]);
sum=sum+a[i];
}
summ=(double)sum/(4*m);
for(int i=0;i<n;i++){
if((double)a[i]>=summ){yes++;}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_118578/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_118578/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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;
scanf("%d %d", &N, &M);
int a[N];
int i,j,ans = 0;
double sum = 0;
for(i = 0;i < N;i++){
scanf("%d", &a[i]);
sum += a[i];
}
for(i = 0;i < N;i++){
if(a[i] >= sum / (4 * M))ans++;
}
if(ans >= M)printf("Yes");
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_118628/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_118628/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 n,m;
scanf("%d %d",&n,&m);
int *ap, *ip;
ap = (int *) calloc(n, sizeof(int));
int i,sum,devide,y;
sum = 0;
y = 0;
ip = ap;
for(i=0;i<n;i++){
scanf("%d",ip);
sum += *ip;
ip += sizeof(int);
}
devide = sum / (m*4);
if(sum > devide * m * 4) devide+... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_118679/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_118679/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <limits.h>
#define REP(i,n) for(i=0;i<n;i++)
#define MAX 1000000
#define MOD 1000000007
long long fac[MAX], finv[MAX], inv[MAX];
//prototype declaration
int i_in();
long long ll_in();
double d_in();
char c_in();
void s_in(char *s)... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_118721/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_118721/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 compare(const void *n1, const void *n2){
if(*(int *)n1 < *(int *)n2)
return 1;
else if(*(int *)n1 > *(int *)n2)
return -1;
else
return 0;
}
int main(void){
int n, m, sum = 0;
int a[100] = {0};
scanf("%d%d", &n, &m);
for(int i=0; i < n; i++) {
scanf("%d", &a[i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_118772/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_118772/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 region kyopuro_templates
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
#include<stdbool.h>
#include<assert.h>
#include<time.h>
#include<ctype.h>
typedef long long ll;
typedef long double ld;
#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))
#def... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_118822/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_118822/source.c"
target datalayout = "e-m:e-p270: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.graph_info = type {... |
// AOJ GRL_1_C All Pairs Shortest Path
// 2018.4.26 bal4u
#include <stdio.h>
#include <string.h>
#define MAX_V 102
#define INF 0x7f7f7f7f
int V;
int d[MAX_V][MAX_V];
int warshall_floyd()
{
int i, j, k, x;
for (k = 0; k < V; k++) {
for (i = 0; i < V; i++) if (d[i][k] != INF) {
for (j = 0; j < V; j++) if (d[k... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_118866/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_118866/source.c"
target datalayout = "e-m:e-p270: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>
#include<stdlib.h>
#include<time.h>
typedef struct node{
int key;
int priority;
struct node *left;
struct node *right;
}node;
int find(node *p,int x){
while(p!=NULL){
if(p->key == x)return 1;
else if(p->key > x)p=p->left;
else p=p->right;
}
return 0;
}
node * makenode(int x,int ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_118909/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_118909/source.c"
target datalayout = "e-m:e-p270: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.node = type { i32, ... |
#include <stdio.h>
int solve(char s[])
{
int answer;
int A=0,B=0,A_q=0,B_q=0;
int number;
int i;
for(i = 0;i<=9;i++)
{
if((i+1)%2)
{
if(s[i] == '1') A++;
else if(s[i] == '?') A_q++;
}
else
{
if(s[i] == '1') B++;
else if(s[i] == '?') B_q++;
}
if(A + A_q + (9-i)/2 < B || A +A_q>B+(10-i)/2... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_11896/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_11896/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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<stdlib.h>
#define N 1000000
int cnt=0,n,l,A[N],*S;
void insertionSort(int A[], int n, int m){
int i,v,j;
for(i=m;i<n;i++){
v=A[i];
j=i-m;
while(j>=0&&A[j]>v){
A[j+m]=A[j];
j-=m;
cnt++;
}
A[j+m]=v;
}
}
void Sort(int A[],int n){
int i=0,a;
S=(in... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_119009/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_119009/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@cnt = dso_local local_unna... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define N 1000000
int main(){
int i, j, k, v, g, cnt=0, m=1, n, A[N], G[N];
scanf("%d",&n);
if(n > N) exit(1);
for(i = 0; i < n; i++) scanf("%d", &A[i]);
G[0] = 1;
while(1){
G[m] = 3*G[m-1]+1;
if(G[m] > n || m > 100) break;
m++;
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_119052/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_119052/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 insertionSort(int *,int ,int);
void shellSort(int *,int);
int cnt;
int main()
{
int n,i,A[1000000];
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&A[i]);
}
shellSort(A,n);
for(i=0;i<n;i++)
{
printf("%d\n",A[i]);
}
return 0;
}
void insertionSort(int *A... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_119102/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_119102/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
long long cnt;
int l, A[1000000],n,Gsize;
int * G;
void insertionSort(int A[], int n , int g) {
int i,j,v;
for(i = g ; i <= n-1;i++) {
v = A[i];
j = i - g;
while(j >= 0 && A[j] > v ) {
A[j+g] = A[j];
j = j - g;
cnt++;
}
A[j+g] = v;
}
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_119153/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_119153/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@cnt = dso_local local_unna... |
#include<stdio.h>
#include<stdlib.h>
/* ????????????????????£?¨? */
int insertionSort(int* A, int n, int g);
int shellSort(int* A, int n);
/* main??¢??° */
int main(void){
int* A = NULL;
int n, cnt, i;
scanf("%d", &n);
A = (int*)malloc(sizeof(int)*n);
if(A == NULL)exit(1);
for(i = 0;i < n;i++)
scanf("%d", &... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_119197/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_119197/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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;
long long int a[1000],b[1000],n;
scanf("%d",&t);
for(int i=0;i<t;i++)
{
scanf("%lld",&a[i]);
n=a[i]/10;
if(a[i]%10==9)
n++;
b[i]=n;
}
for(int i=0;i<t;i++)
printf("%lld\n",b[i]);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_11924/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_11924/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 g[102], m;
int cnt;
void shell_sort(int n, int *a)
{
int i, j, h, lim;
int key;
lim = n / 9; // 要素数/9
if (lim < 40) lim = 40;
g[0] = 1;
m = 0; do m++, g[m] = 3*g[m-1]+1;
while (g[m] < n && g[m] <= lim);
cnt = 0, h = g[m-1];
while (h > 0) {
for (i = h; i < n; i++) {
key = a[i]... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_119283/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_119283/source.c"
target datalayout = "e-m:e-p270: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>
#include <math.h>
#include <stdlib.h>
#define M 10000
void shell_sort(int a[],int n);
void insertionSort(int a[], int num,int g ,int *cnt);
int main(){
int n,i;
scanf("%d",&n);
int *a;
a = (int*)malloc(sizeof(int)*n);
for(i=0;i<n;i++){
scanf("%d",&a[i]);
}
shell_sort(a,n);
for(i=0;i<n;i++){... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_119326/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_119326/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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;
scanf("%d",&t);
while(t--)
{
int n;
int count;
scanf("%d",&n);
if (n<9)
{
printf("0\n");
}
else if (n>= 9)
{
count = ((n-9)/10)+1;
printf("%d\n",count);
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_11937/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_11937/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 <stdlib.h>
void insertionSort(int *,int,int);
void shellSort(int *,int);
int cnt, m, *G;
int main()
{
int n, i, *A;
scanf("%d",&n);
A = (int *)malloc(n * sizeof(int));
for(i = 0 ; i < n ; i++) scanf("%d",&A[i]);
shellSort(A,n);
printf("%d\n",m);
for(i = 0 ; i < m ; i++) ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_119412/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_119412/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#define ll long long
void swap (int *x, int *y) {
int temp;
temp = *x;
*x = *y;
*y = temp;
return;
}
long int gcd(long int a, long int b){
long int c;
while (b > 0){
c = a % b;
a = b;
b = c;
}
return a;
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_119456/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_119456/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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(a, b) ((a > b) ? (a):(b))
#define min(a, b) ((a > b) ? (b):(a))
#define rep(a, b) for(int a=0; a<b; ++a)
#define rep1(a, b) for(int a=1; a<b; ++a)
int main () {
int t;
scanf("%d", &t);
while(t--) {
int n, conse... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1195/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1195/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
int main(){
int N,K;
scanf("%d%d",&N,&K);
if(N%K==0){
printf("0");
}else{
printf("1");
}
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_119542/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_119542/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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);
if(N%K==0)
printf("0\n");
else
printf("1\n");
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_119586/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_119586/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 <math.h>
#include <stdio.h>
int main(){
int N,K;
scanf("%d" "%d", &N, &K);
if(N%K==0){
printf("0");
}else{
printf("1");
}
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_119636/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_119636/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 hash[1001];
int main()
{
int t, i;
scanf ("%d", &t);
int n=t;
while (t--)
{
int x;
scanf("%d", &x);
hash[x]++;
}
for (i=1; i<=1000; i++)
if ( hash[i]>(n+1)/2){
printf("NO");
return 0;
}
//printf("%d", hash[7]);
printf("YES");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_11968/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_11968/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 n,k;
scanf ("%d %d",&n,&k);
if(n%k) printf("1"); else printf("0");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_119722/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_119722/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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, Q;
char S[500001];
scanf("%d", &N);
scanf("%s", S);
scanf("%d", &Q);
int i, j, count[251][26] = {};
for (i = 0; i < N / 2000; i++) {
for (j = 0; j < 2000; j++) count[i][S[i*2000+j] - 'a']++;
}
for (j = 0; j < N % 2000; j++) count[i][S[i*2000+j] - 'a']++;
int l, r, ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_119766/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_119766/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 min(a, b) ((a)>(b) ? (b) : (a))
int n, m, s[6], c[6];
int ans = 10000;
void dfs(int array[]){
if(array[0] == n){
int num = 0;
int flag = 1;
for(int i=1; i<=n; i++){
num = num * 10 + array[i];
for(int j=0; j<m; j++)
if(s[j] == i)
if(array[i] != c[j]){
flag ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_119816/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_119816/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@ans = dso_local local_unna... |
#include <stdio.h>
int main(){
int a,b;
while(scanf("%d %d",&a,&b)!=EOF){
int ct=0;
while(a<=b){
a *= 3;
b *= 2;
ct++;
}
printf("%d\n",ct);
}
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_11986/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_11986/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 digits, count;
scanf("%d %d", &digits, &count);
int nums[digits];
for (int i = 0; i < digits; i++) {
nums[i] = -1;
}
for (int i = 0; i < count; i++) {
int digit, num;
scanf(" %d %d", &digit, &num);
if (nums[digit - 1] < 0)... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_119902/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_119902/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 n;
scanf("%ld", &n);
long a[n];
for (long i = 0; i < n; i++) {
scanf("%ld", &a[i]);
}
long rain[n];
rain[0] = 0;
for (long i = 1; i < n; i++) {
rain[i] = a[i-1]*2-rain[i-1];
}
if (a[n-1]*2 != rain[0]+rain[n-1]) {
rain[0] = (a[n-1]*2-rain[0]-rain... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_119960/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_119960/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main()
{ int n;
scanf("%d",&n);
long a[n],sum=0;
for(int i=0;i<n;i++){
scanf("%ld",&a[i]);
sum+=a[i];
}
int x[100000]={0};
x[0]=sum;
for(int i=1;i<n;i+=2){
x[0]-=2*a[i];
}
printf("%d ",x[0]);
for(int i=1;i<n;i++){
x[i]=2*... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_120001/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_120001/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<stdlib.h>
#include<stdint.h>
#include<inttypes.h>
typedef int32_t i32;
typedef int64_t i64;
#define ALLOC(size,type) ((type*)calloc((size),sizeof(type)))
i64 calc (i64 *a, i32 n, i32 x) {
for (i32 i = 0; i < n; ++i) {
x = a[i] - x;
}
return x;
}
void run (void) {
i32 n;
scan... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_120045/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_120045/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 *check(char *str, int len, int *cnt) {
int i, j = 0;
int *list = (int*)malloc(len * sizeof(int));
list[j] = 0; ++j;
for(i = 1; i < len; ++i) {
if(str[i-1] != str[i]) { list[j] = i; ++j; }
}
list[j] = i; ++j;
*cnt = j;
return list;
}
vo... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_120089/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_120089/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
int main()
{
char s[5];
scanf("%s",s);
char sat[]="SAT",sun[]="SUN",mon[]="MON"
,tue[]="TUE",wed[]="WED",thu[]="THU",fri[]="FRI";
if(strcmp(s,sat)==0)printf("1\n");
else if(strcmp(s,sun)==0)printf("7\n");
else if(strcmp(s,mon)==0)printf("6\n");
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_120139/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_120139/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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,cnt=0;
scanf("%d %d",&a,&b);
if(a==0&&b==0)
printf("0\n");
while(a<=b)
{
a=a*3;
b=b*2;
cnt++;
}
printf("%d\n",cnt);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12019/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12019/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 a = getchar()*256+getchar();
char n;
switch(a){
case 'S'*256+'U': n=7; break;
case 'M'*256+'O': n=6; break;
case 'T'*256+'U': n=5; break;
case 'W'*256+'E': n=4; break;
case 'T'*256+'H': n=3; break;
case 'F'*256+'R': n=2; break;
case 'S'*256+'A': n=1; break;
}
put... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_120254/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_120254/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@stdin = external local_unn... |
#include <stdio.h>
#include <string.h>
char week[8][4] ={"SUN","MON","TUE","WED","THU","FRI","SAT"};
int main(void){
char S[4];
if(scanf("%s",&S)<1) return 1;
for(int i=0;i<7;i++){
if(strcmp(week[i],S)==0)
printf("%d\n",7-i);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_120298/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_120298/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@week = dso_local global [8... |
#include <stdio.h>
#include <string.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define max(a, b) ((a) > (b) ? (a) : (b))
#define min(a, b) ((a) < (b) ? (a) : (b))
//scanf("%d", &n);
//scanf("%c", &c);
//scanf("%lf", &d);
#define NUM (10000)
void solve(){
char str[256];
scanf("%s", str);
i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_120348/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_120348/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 m;
char a[5];
scanf("%s",a);
if(strcmp(a,"SUN")==0)
printf("7\n");
if(strcmp(a,"MON")==0)
printf("6\n");
if(strcmp(a,"TUE")==0)
printf("5\n");
if(strcmp(a,"WED")==0)
printf("4\n");
if(strcmp(a,"THU")=... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_120399/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_120399/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 Mod 1000000007
int **g;
int used[100000] = {};
int in[100000] = {};
int k;
long long ans;
long long P(long long a, long long b){
long long r = 1;
if(a < b) return 0;
for(int i = 0; (long long)i < b; i++){
r = r * a % Mod;
a--;
}
return r;
}
void df... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_120449/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_120449/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@used = dso_local local_unn... |
#include<stdio.h>
int main()
{
int n,s,temp,sum=0;
scanf("%d",&n);
temp=n;
while(temp!=0)
{
sum=sum+temp%10;
temp=temp/10;
}
if(n%sum==0)
printf("Yes\n");
else
printf("No\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_120542/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_120542/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 sub(int n){
if(n < 10){
return n;
}
int a = n / 10;
return n % 10 + sub(a);
}
int main(){
int in;
scanf("%d",&in);
if(in % sub(in) == 0){
printf("Yes");
}else{
printf("No");
}
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_120586/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_120586/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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<limits.h>
int pw(int n) {
if(n==0) {
return 1;
}
int i;
int ans = 1;
for(i=0; i<n; i++) {
ans *=10;
}
return ans;
}
int main(void){
int N;
scanf("%d", &N);
int digit = 0;
int number = N;
wh... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_120629/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_120629/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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;
while(scanf("%d%d",&a,&b)==2)
{
c=0;
while(1)
{
c++;
a=a*3;
b=b*2;
if(a>b) break;
}
printf("%d\n",c);
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12068/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12068/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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(){
long long N,S=0,n;
scanf("%lld",&N);
n=N;
while(n>0){
S+=n%10;
n/=10;
}
if(N%S==0)printf("Yes\n");
else printf("No\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_120722/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_120722/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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,sum=0,i,t;
scanf("%d",&n);
t=n;
while(t>0){
sum+=t%10;
t/=10;
}
if(n%sum)
printf("No\n");
else
printf("Yes\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_120773/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_120773/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 num;
int dig;
int sum = 0;
scanf("%d", &num);
int b=num;
while(num){
dig = num % 10;
sum = sum + dig;
num = num / 10;
}
if(b%sum==0) printf("Yes");
else printf("No");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_120816/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_120816/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 int a,b,c,d,max=0;
scanf("%ld %ld %ld %ld",&a,&b,&c,&d);
if(max<a)
max=a;
if(max<b)
max=b;
if(max<c)
max=c;
if(max<d)
max=d;
if(max!=a)
printf("%ld ",max-a);
if(max!=b)
printf("%ld ",max-b);
if(max!=c)
printf("%ld ",max-c);
if(max!=d)
printf("%ld... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12086/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12086/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 n,m,k = 0;
int a = 0;
int b = 0;
unsigned long aSum[200010];
unsigned long bSum[200010];
int ai,bi = 0;
int count = 0;
//For binary search
int mid = 0;
int left = 0;
int right = 0;
aSum[0] = 0;
bSum[0] = 0;
scanf("%d%d%d",&n,&m,&k);
for(ai=1;ai<n+1;ai++){
s... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_120924/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_120924/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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;
int a[200000], b[200000];
ll bsum[200010] = {0};
int binarySearch(int key, int num) {
int ok = -1, ng = num, mid;
while (ng - ok > 1) {
mid = (ng + ok) / 2;
if (bsum[mid] <= key)
ok = mid;
else
ng = mid;
}
return ng;
}
int main() {
int n, m, k;
int ans = 0;
sc... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_120968/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_120968/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@bsum = dso_local local_unn... |
#include <stdio.h>
#include <stdlib.h>
int inz(void const *a, void const *b)
{
return (*(int *)b - *(int *)a);
}
int main()
{
int n, j, i, count=0;
scanf("%d", &n);
int ara[n+1], uniqe[4];
for(i=0; i<n; i++){
scanf("%d", &ara[i]);
}
ara[n]=102;
qsort(ara, n, 4, inz);
for... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12101/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12101/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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()
{
long n,i,nw[300001],ne[300001],ans=0,wcnt=0,ecnt=0,iti=0;
char s[3000001];
scanf("%ld",&n);
scanf("%s",s);
for(i=0;i<n;i++){
if(s[i]=='W'){
wcnt++;
}else{
ecnt++;
}
nw[i]=wcnt;
ne[i]=ecnt;
}
lon... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121053/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121053/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 east[300005],west[300005];
char a[300005];
int main()
{
int n;
scanf("%d",&n);
scanf("%s",&a[1]);
int i;
for(i=1; i<=n; i++)
{
east[i] = east[i-1];
if(a[i]=='W')east[i]++;
}
for(i=n; i>=1; i--)
{
west[i] = west[i+1];
if(a[i]=='E')west[i]++;
}
int ans = n+1;
int cur;
for(i=1; i<=n; i++)
{
cur... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121097/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121097/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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()
{
long long int a[4];
scanf("%I64d %I64d %I64d %I64d",&a[0],&a[1],&a[2],&a[3]);
int i;
long long int max=0;
i=0;
while(i<4)
{
if(a[i]>max)
max=a[i];
i++;
}
i=0;
while(i<4)
{
if(a[i]!... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12114/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12114/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
long long int a[255];
long long int main()
{
long long int n,fc=1,lc=1,tc=0,len=0,mc=0;
char s[105];
scanf("%s",s);
scanf("%lld",&n);
for(long long int i=0;s[i]!='\0';i++)
{
a[s[i]]++;
len++;
}
if(a[s[0]]==len)
{
printf("%lld\n",(n*len)/2);
}
else if(s[0] == s[len-1])
{
for(long l... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121183/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121183/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
//ll
#define QMAX 10101010
typedef struct quet{ ll que[QMAX], front, back; } QUEUE;
QUEUE *make_queue(){ QUEUE *q = malloc(sizeof(QUEUE)); q->back = 0; q->front = 0; return q;}
void push(QUEUE *q, ll val){ q->que[... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121226/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121226/source.c"
target datalayout = "e-m:e-p270: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.quet = type { [1010... |
#include <stdio.h>
#include <stdlib.h>
int count=0;
int judge(long long int data,int n,int a,int b,int c)
{
if(data>n)
return 0;
if(a==1&&b==1&&c==1)
{
count++;
}
judge(data*10+3,n,1,b,c);
judge(data*10+5,n,a,1,c);
judge(data*10+7,n,a,b,1);
return 0;
}
int main()
{
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121277/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121277/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@count = dso_local local_un... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(){
char s[101];
int a, b, n, z, z1, z2, o = 0, z22 = 0, j;
scanf("%s", s);
n = strlen(s);
a = n/20;
if(n % 20 != 0) a++;
b = n/a;
if(n % a != 0) b++;
//printf("n = %d\n", n);
printf("%d %d\n", a, b);
z = a*b - n;
z1 = z/a... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12132/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12132/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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(){
int i,j;
char s[5],a;
scanf("%s",s);
for(i=0;i<3;i++)
for(j=i+1;j<4;j++)
if(s[i]<s[j]){
a=s[i];
s[i]=s[j];
s[j]=a;
}
if(s[0]==s[1] && s[2]==s[3] && s[1]!=s[2])
printf("Yes\n");
else
printf("No\n");
return 0;
}... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121363/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121363/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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[5];
if(scanf("%s",s)==-1){
return 1;
};
if((s[0]==s[1]&&s[2]==s[3]&&s[0]!=s[2])||(s[0]==s[2]&&s[1]==s[3]&&s[0]!=s[1])||(s[0]==s[3]&&s[1]==s[2]&&s[0]!=s[1])){
printf("%s","Yes");
}
else{
printf("%s","No");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121406/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121406/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
long long int a[50];
int main()
{
int i,j,s,k,n;
scanf("%d%d",&s,&k);
long long int sum=0;
//make atmost 50 entries in array a
a[0]=1;
for(i=1;i<50;i++)
{
sum=0;
for(j=i-1;j>=i-k;j--)
{
if(j<0)break;
sum+=a[... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12145/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12145/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 a[100000], ans[100000];
int main()
{
int k, n;
scanf("%d%d",&n,&k);
a[0]=0;
a[1]=1;
int sum=0;
int i=1,j;
while(sum<n)
{
if((i+1-k)>=0)
sum-=a[i-k];
sum+=a[i];
a[++i]=sum;
}
int x=0;
for(j=i;j>=0;j--)
{
if((n-a[j])>=0)
{
n-=a[j];
ans[x]=a[j];
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12150/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12150/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 data[4];
char* result="";
int flag=0;
scanf("%s" , data);
for(int i=0;i<4;i++){
for(int j=0;j<4;j++){
if(i==j){
}else{
if(data[i]==data[j]){
flag+=1;
}
}
}
}
if(flag==4){
result="Yes";
}else{
result... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121543/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121543/source.c"
target datalayout = "e-m:e-p270:32: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()
{
char S[4];
int a=0;
int b=0;
char c;
char d;
int OK;
scanf("%s",S);
c = S[0];
for(int i=0;i<4;i++){if(S[i]!=c){d=S[i];OK=1;}}
for(int i=0;i<4;i++){if(S[i]==c)a++;}
if(OK){
for(int i=0;i<4;i++){if(S[i]==d)b++;}
}else
{
b=0;
}
printf("%s\n",(a==2 && b==2)? "Yes":"No");
r... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121594/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121594/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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[4];
for(int i=0;i<4;i++){
scanf("%s",&s[i]);
}
if(s[0]==s[1]){
if(s[2]==s[3]&&(s[0]!=s[2])){
puts("Yes");
return 0;
}
}
if(s[0]==s[2]){
if((s[1]==s[3])&&(s[0]!=s[1])){
puts("Yes");
return 0;
}
}
if(s[0]==s[3]){
if(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121651/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121651/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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) {
char s[4];
char a, b;
scanf("%s", s);
a = s[0];
if(s[1] == a) {
if (s[2] == s[3] && s[2] != a) {
printf("Yes\n");
return 0;
}
else {
printf("No\n");
return 0;
}
}
else {
b = s[1];
if(s[2] == a) {
i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121701/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121701/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 n;
int i,j,k,t,a,b;
int namenagasa,kanbannagasa;
int cnt=0;
char name[26],kanban[201] ;
scanf("%d",&n);
scanf("%s",name);
namenagasa=strlen(name);
for(i=0;i<n;i++){
scanf("%s",kanban);
kanbannagasa=strlen(kanban)... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121745/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121745/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
long int LCM(long int, long int);
void swap(long int*, long int*);
int main(){
long int a,b;
long int lcm,gcd;
while(scanf("%ld %ld",&a,&b) != EOF){
swap(&a,&b);
lcm = LCM(a,b);
gcd = a/lcm*b;
printf("%ld %ld\n",lcm,gcd);
}
return 0;
}
long int LCM(long int a, long int b)... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121789/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121789/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 m, n, a, b, x, y, gcd, lcm, btmp;
int i;
while ((scanf("%d %d", &m, &n)) != EOF){
a = m;
b = n;
x = m;
y = n;
/*最大公約数*/
if (b == 0){
gcd = a;
}
else {
while (1){
if (b == 0){
break;
}
btmp = b;
b = a % b;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121831/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121831/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
int a,b,c,d;
int i,j,temp;
while(scanf("%d %d",&a,&b)!=EOF){
c = a;
d = b;
for(i = 1,j = 1;1;){
if(a*j>b*i){
i++;
}else if(a*j<b*i){
j++;
}else if(a*j == b*i){
break;
}
}
for(;1;){
if(c % d != 0){
temp = c%d;
c = d;
d = temp;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121875/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121875/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 n;
while(a % b != 0){
n = b;
b = a % b;
a = n;
}
return (b);
}
int main (void){
int a, b;
int gcd, lcm;
while (scanf("%d %d", &a, &b) != EOF){
gcd = GCD(a, b);
lcm = a * (b / gcd);
printf("%d %d\n", gcd, lcm);
}
return (0);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121918/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121918/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 swap(a,b) {long tmp=a;a=b;b=tmp;}
long gcm(long m, long n){
long newm,newn;
if(n==0)return m;
newn = m%n;
newm = n;
return gcm(newm,newn);
}
int main(){
long a,b;
long g,l;
while(scanf("%ld %ld", &a,&b)!=EOF){
if(a<b)swap(a,b);
g = gcm(a,b);
l = a/g*b;
printf("%d %d\n",g, l... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121961/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121961/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 euclid(int a, int b)
{
return b ? euclid(b, a % b) : a;
}
int main(void)
{
int a, b, r, e;
while (scanf("%d%d", &a, &b) != EOF) {
printf("%ld %ld\n", euclid(a, b), (b / euclid(a, b)) * a);
}
return (0);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122003/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122003/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 calcGCD(int a,int b){
//??????????????????????????????
int temp,i,r;
//??????a???????????§???????????????????????????
if(a < b){
temp = a;
a = b;
b = temp;
}
while(1){
r = a % b;
if(r == 0) break;
a = b; b = r;
}
return b;
}
long calcLCM(int a,int b){
return ((long)a * b)... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122054/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122054/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void){
int a,b,c,tmp,tmp_a,tmp_b;
while(scanf("%d%d", &a, &b)!=EOF){
c = 1;
if(b > a){tmp = a; a = b; b = tmp;}
tmp_a = a;
tmp_b = b;
for(int i=2; i<=tmp_b; i++){
while(tmp_b%i==0 && tmp_a%i==0){
c = c*i;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122098/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122098/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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, sum, temp;
while(scanf("%lld %lld",&a,&b) != EOF)
{
if(a < b){
temp = a;
a = b;
b = temp;
}
sum = a * b;
while(b != 0)
{
a %= b;
temp = a;
a = ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122140/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122140/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.