Source_Code stringlengths 69 484k | IR_Original stringlengths 2.05k 17.9M |
|---|---|
#include <stdio.h>
int N, T, c, t, cost = 10000;
int main()
{
scanf("%d%d", &N, &T);
for (int i = 0; i < N; i++)
{
scanf("%d%d", &c, &t);
if (t <= T && c < cost) cost = c;
}
if (cost < 10000) printf("%d", cost);
else puts("TLE");
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_188432/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_188432/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@cost = dso_local local_unn... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#define INF 10000000000
#define M 1000000007
#define min(a,b) (((a)<(b))?(a):(b))
#define max(a,b) (((a)>(b))?(a):(b))
int main() {
long N, L, Q;
long x[100001];
long i, j, k;
long a, b, tmp;
long move[100001];
long move100[100001];
lon... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_188533/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_188533/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
int b;
int h;
int area = 0;
scanf("%d", &a);
scanf("%d", &b);
scanf("%d", &h);
area = (a + b) * h / 2;
printf("%d\n", area);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_188584/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_188584/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,h;
scanf("%d %d %d",&a,&b,&h);
int rslt=(a+b)*h/2;
printf("%d\n",rslt);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_188634/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_188634/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,h;
scanf("%d %d %d",&a,&b,&h);
printf("%d",(a+b)*h/2);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_188685/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_188685/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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
#define rep(i,l,r) for(ll i=(l);i<(r);i++)
#define max(p,q) ((p)>(q)?(p):(q))
#define min(p,q) ((p)<(q)?(p):(q))
#define chmax(a,b) ((a)=(a)>(b)?(a):(b))
#define chmin(a,b) ((a)=(a)<(b)?(a):(b))
#define abs(p) ((p)>=(0)?(p... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_188742/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_188742/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,h;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&h);
printf("%d",(a+b)*h/2);
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_188786/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_188786/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,h;
scanf("%d%d%d",&a,&b,&h);
printf("%d",(a+b)*h/2);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_188836/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_188836/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,h;
scanf("%d %d %d",&a,&b,&h);
if(((a>=1||a<=100)&&(b>=1||b<=100))&&((h>=1||h<=100)&&(h%2==0)))
printf("%d\n",((a+b)*h)/2);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_188937/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_188937/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,h,s;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&h);
s = (a+b)*h/2 ;
printf("%d\n" , s );
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_188988/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_188988/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 puz[3][3];
int tmp[3][3];
int dx[4]={0,1,0,-1};
int dy[4]={1,0,-1,0};
void empty(int *x,int *y) {
int i,j;
for(i=0;i<3;i++){
for(j=0;j<3;j++){
if(!puz[i][j]){
*x=j;
*y=i;
return;
}
}
}
}
void swap(int *a, int *b) {
int tmp... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_189073/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_189073/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@dx = dso_local local_unnam... |
#include <stdio.h>
#include <stdlib.h>
int a[10],fa[10]={1,1,2,6,24,120,720,5040,40320};
int que[363000],quec,dp[362880];
void swap(int i,int j){
int t;
t=a[i];
a[i]=a[j];
a[j]=t;
}
int ff(){
int i,ans=0,b=0;
for(i=8;i>=0;i--){
ans+=__builtin_popcount(b&((1<<a[i])-1))*fa[8-i];
b|=1<<a[i];
}
r... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_189116/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_189116/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@fa = dso_local local_unnam... |
#include <stdio.h>
#define N 3
int sum[N][N] =
{
{1, 2, 3},
{4, 5, 6},
{7, 8, 0}
};
int dx[] = { 0, 1, 0, -1 };
int dy[] = { -1, 0, 1, 0 };
int num(int gum[N][N]) {
for (int a = 0; a < N; ++a) {
for (int b = 0; b < N; ++b) {
if (gum[a][b] != sum[a][b])
return 0;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_189167/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_189167/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@sum = dso_local local_unna... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{ int n,j,i,x;
char g[100];
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%s",g);
x=strlen(g);
for(j=0;j<x;j++)
{ if(j%2==0)
{
if(g[j]!='a')
g[j]='a';
else
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18921/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18921/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
int mas[3][3];
int cpy[3][3];
void input() {
int i, j;
for(i = 0; i < 3; i++)
for(j = 0; j < 3; j++)
scanf("%d", &mas[i][j]);
}
void output() {
int i, j;
for(i = 0; i < 3; i++) {
for(j = 0; j < 3; j++) printf("%3d", mas[i][j]);
puts("");
}
}
void co... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_189253/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_189253/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 w,n,i,l[31];
scanf("%d%d",&w,&n);
for(i=1;i<=w;i++) l[i]=i;
for(i=0;i<n;i++) {
int a,b,t;
scanf("%d,%d",&a,&b);
t=l[a];l[a]=l[b];l[b]=t;
}
for(i=1;i<=w;i++) printf("%d\n",l[i]);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_189297/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_189297/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#define MAX 30
void swap(int *, int *);
int main(void) {
int i = 0, a, b, w, ary[MAX] = {};
for(scanf("%d %*d", &w); i < w; ary[i] = -~i++);
for(; ~scanf("%d%*c%d", &a, &b); swap(&ary[~-a], &ary[~-b]));
for(i = 0; i < w; printf("%d\n", ary[i++]));
return 0;
}
void swap(int *a, ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_189347/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_189347/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 w,n,a,b,i,te;
int da[100];
scanf("%d",&w);
scanf("%d",&n);
for(i=1;i<=w;i++) da[i]=i;
for(i=1;i<=n;i++){
scanf("%d,%d",&a,&b);
te=da[a];
da[a]=da[b];
da[b]=te;
}
for(i=1;i<=w;i++) printf("%d\n",da[i]);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_189398/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_189398/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 _USE_MATH_DEFINES
#include <math.h>
int main(void){
int i , a , buf , b , w , n , lines[31];
scanf("%d" , &w);
scanf("%d" , &n);
for(i=1;i<=w;i++){
lines[i] = i;
}
for(i=1;i<=n;i++){
scanf("%d,%d" , &a , &b);
buf = lines[a];
lines[a] = lines[b];
lines[b] = buf;
}
for(i=1;i<... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_189462/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_189462/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 low[30];
int a,b,c,d,n,w;
for(a=0;a<31;a++){
low[a]=a+1;
}
scanf("%d",&w);
scanf("%d",&n);
for(a=0;a<n;a++){
scanf("%d,%d",&b,&c);
d=low[b-1];
low[b-1]=low[c-1];
low[c-1]=d;
}
for(a=0;a<w;a++){
printf("%d\n",low[a]);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_189505/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_189505/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 w,n,a,b,i,tmp;
int line[30];
scanf("%d",&w);
scanf("%d",&n);
for(i = 0;i < w;i++){
line[i] = i+1;
}
for(i = 0;i < n;i++){
scanf("%d,%d",&a,&b);
tmp = line[a-1];
line[a-1] = line[b-1];
line[b-1] = tmp;
}
for(i = 0;i < w;i++){
printf("%d\n",line[i]);
}
retur... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_189549/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_189549/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 w,n,sav;/*縦、横、一時保存*/
int i;
int pos[30],x[30],y[30];/*位置、入れ替え*/
char c;
while(1)
{
scanf("%d",&w);
scanf("%d",&n);
if((w<1 || w>30)||(n<1 || n>30))
continue;
for(i=0;i<n;i++)
{
scanf("%d%c%d",x+i,&c,y+i);
if((x[i]<1 || x[i]>w)||(y[i]<1 || y[i]>w))
i--;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_189592/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_189592/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 w, i = 0;
int x1, x2, y, n;
scanf("%d",&w);
scanf("%d",&n);
int array [30] = {0};
for (i = 0; i < w; i++) {
array[i] = i + 1;
}
for (i = 0; i < n; i++) {
scanf("%d,%d", &x1, &x2);
y = array [x1-1];
array [x1-1] = array [... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_189635/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_189635/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
int i;
int a,b,w,n,temp,na,nb;
int num[50];
scanf("%d %d",&w,&n);
for(i=0;i<w;i++){
num[i]=i+1;
}
for(i=0;i<n;i++){
scanf("%d,%d",&a,&b);
temp=num[a-1];num[a-1]=num[b-1];num[b-1]=temp;
}
for(i=0;i<w;i++){
printf("%d\n",num[i]);
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_189679/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_189679/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 l, m, n, i, ans = 0, a, b, c, d;
scanf("%d %d %d", &l, &m, &n);
scanf("%d %d", &a, &b);
for (i = 1; i < n; i++){
scanf("%d %d", &c, &d);
while (1){
if (a == c && b == d) break;
ans++;
if (a < c && b < d){
a++;
b++;
continue;
}
if (a > c && b > d){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_189729/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_189729/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
long long a,b,x,y,t,p,q,g,a1,a2;
scanf("%lld %lld %lld %lld",&a,&b,&x,&y);
p=x;q=y;
while(y!=0){
t=y;
y=x%y;
x=t;
}
g=x;
p=p/g;
q=q/g;
a1=a/p;
a2=b/q;
if(a1<a2)printf("%lld\n",a1);
else printf("%lld\n",a2);
return... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18978/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18978/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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){
long long m,n;
scanf("%lld%lld",&m,&n );
long long r = 1000000007;
int b[32];
long long na =n;
int i = 0;
while ( na != 0) {
b[i] = na % 2;
na /= 2;
i++;
}
long long a[32];
a[0] = m;
for (int j = 1; j < i ; j++) {
a[j] = a[j - 1] * a[j - 1];... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_189822/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_189822/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
/*
cat <<EOF >mistaken-paste
*/
#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
#define _USE_MATH_DEFINES
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#include <time.h>
#define BIG 2000000007
#define VERYBIG 200000000000007LL
#de... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_189866/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_189866/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdbool.h>
//T -- 0 A -- 1 G -- 2 C -- 3
long mod = 1e9+7;
long add(long a, long b) {
return (a + b) % mod;
}
bool ng(int a, int b, int c) {
return (a == 1 && b == 2 && c == 3);
}
void solve(int n) {
int i, a, b, c, d;
long ans;
long dp[n+2][4][4][4];
for(i = 0; i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_189916/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_189916/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@mod = dso_local local_unna... |
#include<stdio.h>
int main(){
long long a,b,x,y,m,n,c,t,p,q;
scanf("%lld %lld %lld %lld", &a, &b, &x, &y);
m = x;
n = y;
/*printf("%lld %lld\n",m,n);*/
if(m < n){
c = m;
m = n;
n = c;
}
do{
t = m % n;
m = n;
n = t;
}
wh... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18996/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18996/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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,b,hei;
scanf("%d %d",&a,&b);
hei=(a+b)/2;
printf("%d\n",hei);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_190008/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_190008/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
int a,b;
scanf("%d %d",&a,&b);
printf("%d\n",(a+b)/2);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_190051/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_190051/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 comp(const void *a, const void *b) { return *(int *) a - *(int *) b; }
int main() {
while (1) {
int N, P;
scanf("%d %d", &N, &P);
if (N == -1 && P == -1) break;
int prime[100], primeSize = 0;
for (int n = N + 1; primeSize < P; n++) {
int isPrime =... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_190095/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_190095/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 int int64;
typedef struct RSQandRAQ{
int *add;
int64 *sum;
int size;
} segTree;
segTree* newRSQandRAQ(const int n){
int k=1;
while(k<n) k*=2;
segTree *s=(segTree *)malloc(sizeof(segTree));
s->add=(int *)calloc(2*k,sizeof(int));
s->sum=(int64 *)ca... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_190138/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_190138/source.c"
target datalayout = "e-m:e-p270: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.RSQandRAQ = type { ... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
int cmp(const void *a,const void *b){
if(*(int*)a>*(int*)b){return 1;}
else if(*(int*)a<*(int*)b){return -1;}
else {return 0;}
}
int main(void){
int n,a[105];
int dif=1;
int color;
int ans=0;
scanf("%d",&n);
for(int i=0;i<n;i++... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_190181/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_190181/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i,temp,ren=0,prev,ans=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&temp);
if(i==0){
prev=temp;
ren=1;
continue;
}
if(temp==prev){
ren++;
}else{
ans+=ren/2;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_190224/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_190224/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,d[110],c=1,s=0,i;
scanf("%d",&n);
for(i=0;i<n;i++)scanf("%d",&d[i]);
d[n]=-1;
for(i=0;i<n;i++){
if(d[i]==d[i+1])c++;
else{
s+=c/2;
c=1;
}
}
printf("%d\n",s);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_190268/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_190268/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
#include <time.h>
typedef long long ll;
typedef long double ld;
#define INF (1LL<<60)
/*swap 交換*/
void swap(ll *a, ll *b){ll c;c=*b;*b=*a;*a=c;}
/*2つのうち大きい数を返す*/
ll max2(ll a,ll b){return a>=b?a:b;}
/*2つのうち小さい数を返す*/
ll min2(ll a,ll b){return a>=b?... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_190310/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_190310/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
int a[100010]={};
int n,t,ans;
scanf("%d", &n);
ans=n;
for (int i = 0; i < n; i++)
{
scanf("%d", &t);
if(t <= 100000){
a[t]++;
}
}
for (int i = 1; i <= 100000; i++)
{
if(a[i]>=i){
ans -= i;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_190354/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_190354/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
typedef long long int int64;
#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
#define ABS(a) ((a)>(0)?(a):-(a))
int64 modInverse(const int64 a,const int mod){
int n=mod-2;
int64 t=1;
int64 s=a;
while(n>0){
if(n&0x01) t=t*s%mod;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_190398/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_190398/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
int A,B;
scanf("%d %d",&A,&B);
if((A+B)%2==0){
printf("%d\n",(A+B)/2);
}else{
printf("IMPOSSIBLE\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_190440/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_190440/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
long long int A,B,K;
scanf("%lld%lld",&A,&B);
if((A+B)%2==0)
{
K=(A+B)/2;
printf("%lld",K);
}
else
printf("IMPOSSIBLE");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_190491/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_190491/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
int B;//A!=B;
int K;
scanf("%d %d",&A,&B);
K=(A+B)/2;
if((A+B)%2==0){
printf("%d",K);
}else{
printf("IMPOSSIBLE");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_190549/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_190549/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,k;
scanf("%d%d", &a, &b);
k = a + b;
if (k % 2 == 0)
printf("%d", k/2);
else
printf("IMPOSSIBLE");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_190592/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_190592/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
int a, b, c, d, k, found=0;
scanf("%d %d", &a, &b);
for(k=0; k<1000000000; k++)
{
c=a-k;
if(c<0)
c=c*(-1);
d=b-k;
if(d<0)
d=d*(-1);
if(c==d)
{
found=1;
break;
}
}... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_190635/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_190635/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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);
long long int c=a+b;
if(c%2==0)
printf("%lld\n",c/2);
else
printf("IMPOSSIBLE\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_190679/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_190679/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, ans;
scanf("%d%d", &a, &b);
ans = a+b;
if ((ans % 2))
puts("IMPOSSIBLE");
else
printf("%d", ans/2);
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_190721/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_190721/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
int main(){
int a,b;
scanf("%d%d",&a,&b);
if(((a%2==0)&&(b%2==0))||((a%2==1)&&(b%2==1)))printf("%d",(a+b)/2);
else printf("IMPOSSIBLE");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_190772/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_190772/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, b;
scanf("%d%d", &a, &b);
if(ceil((double)(a + b) / 2) == floor((double)(a + b) / 2)) {
printf("%d\n", (a + b) / 2);
} else {
printf("IMPOSSIBLE\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_190822/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_190822/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a,b,a2,b2,k,check;
check = 0;
scanf("%d %d",&a,&b);
for(int i = 0; i <= 1000000000; i++){
a2 = abs(a-i);
b2 = abs(b-i);
if(a2==b2){
k = i;
check = 0;
printf("%d\n",i);
break;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_190873/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_190873/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
int k;
scanf("%d %d",&a,&b);
if(a>b)
{
c=a;
a=b;
b=c;
}
if((a+b)%2==1)
printf("IMPOSSIBLE");
else
printf("%d",(a+b)/2);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_190916/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_190916/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
scanf("%ld%ld",&a,&b);
if((a+b)%2==0){
printf("%ld\n",(a+b)/2);
}else{
printf("IMPOSSIBLE\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_190967/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_190967/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, w, i, j, itmv, itmw, v1, v2;
int value[100], weight[100];
int **wv, *wv_data;
scanf("%d %d", &n, &w);
for (i=0; i<n; i++) {
scanf("%d %d", &value[i], &weight[i]);
}
wv_data = (int*)malloc(sizeof(int) * (n+1) * (w+1))... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_191009/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_191009/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
int main(void)
{
char s[128];
int conv[256];
int val[7] = {1, 5, 10, 50, 100, 500, 1000};
int len;
int res;
int i;
for (i = 0; i < 7; i++){
conv["IVXLCDM"[i]] = i;
}
while (scanf("%s", s) != EOF){
res = 0;
len = strlen(s);
for (i = 0; i < len; i++){
if (i ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_191067/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_191067/source.c"
target datalayout = "e-m:e-p270: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.val = private... |
#include <stdio.h>
int main()
{
int a[100000]={0},b[100000],n,i;
while(scanf("%d",&n)!=EOF)
{
for(i=0;i<n;i++)
scanf("%d",&a[i]);
for(i=0;i<n-1;i++)
b[i]=a[i]+a[i+1];
b[n-1]=a[n-1];
for(i=0;i<n-1;i++)
printf("%d ",b[i]);
printf("%d\n",b[n-1]);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_19111/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_19111/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 double a, ans=0;
int n;
scanf("%d",&n);
for(int i=0; i<n; i++){
scanf("%Lf",&a);
ans += (1.0 / a);
}
printf("%.10Lf\n", 1.0 / ans);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_191153/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_191153/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,x;
float a=0,b=0,c,y[100];
scanf("%d",&n);
for(x=1;x<=n;x++)
{
scanf("%f",&y[x]);
}
for(x=1;x<=n;x++)
{
a+=(1/y[x]);
}
b=(1/a);
printf("%f\n",b);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_191197/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_191197/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
double A;
double sum=0.0;
int i;
scanf("%d",&N);
for(i=0;i<N;i++){
scanf("%lf",&A);
sum+=1.0/A;
}
sum = 1.0 / sum;
printf("%lf\n",sum);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_191247/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_191247/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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);
double a[n], b = 0.00;
for (size_t i = 0; i < n; i++) {
scanf("%lf", a+i);
b += 1/a[i];
}
printf("%lf\n", 1/b);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_191290/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_191290/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <stdbool.h> //for bool
#include <stdlib.h> // abs,labs,llabs
#include <limits.h>
#include <ctype.h>
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld; //%Lf
int main(void) {
int n, i;
float ans = 0.0, x;
scanf(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_191333/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_191333/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int N;
int A[100];
double ans = 0;
scanf("%d", &N);
for (int i=0;i<N;i++) {
scanf("%d", A+i);
ans += 1.0 / A[i];
}
printf("%f", 1.0 / ans);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_191377/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_191377/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i;
scanf("%d",&n);
long int a[n],b[n];
for(i=0;i<n;i++)
scanf("%ld\t",&a[i]);
for(i=0;i+1<=n;i++)
{
b[i]=a[i]+a[i+1];
}
b[n-1]=a[n-1];
for(i=0;i<=n-1;i++)
printf("%ld\t",b[i]);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_19142/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_19142/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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;
scanf("%d",&n);
double a[n],x=0;
for(int i=0; i<n; i++){
scanf("%lf",&a[i]);
a[i]=1/a[i];
x+=a[i];
}
printf("%f",1/x);
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_191463/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_191463/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
scanf("%d", &n);
int mx=0, mn=2000, i;
for(i=0; i<n; i++){
int tmp;
scanf("%d", &tmp);
mx = tmp>mx? tmp:mx;
mn = tmp<mn? tmp:mn;
}
printf("%d\n", (mx-mn+1)/2);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_191506/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_191506/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
long long a,ara[100009],n,i,arr[433874];
while(scanf("%lld",&a)==1)
{
for(i=0;i<a;i++)
{
scanf("%lld",&ara[i]);
}
for(i=a-1;i>=0;i--)
{
arr[i]=ara[a-1];
arr[i]=ara[i]+ara[i+1];
}
for(i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_19155/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_19155/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 ... |
/*
* main.c
*
* Created on: 2019/07/21
* Author: family
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
typedef long long int ll;
ll A[200001] = {0};
ll a[200001] = {0};
ll b[200001] = {0};
int main()
{
ll N = 0, i = 0, sum = 0, ans = 0, sumr = 0, j = 0;
scanf("%lld", &N... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_191607/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_191607/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@A = dso_local global [2000... |
// AOJ 0329: Bilateral Trade
// 2017.8.26 bal4u@uu
// 2017.11.14
#include <stdio.h>
#define MAX 200000
#define HASHSIZ 370003LL
#define BASE 200000000000001LL // -200,000 x 10^9
typedef struct { int i; long long s; } HASH;
HASH hash[HASHSIZ+2], *hashend = hash+HASHSIZ;
int insert(int i, long long s)
{
HA... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_191665/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_191665/source.c"
target datalayout = "e-m:e-p270: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.HASH = type { i32, ... |
#include<stdio.h>
int judge_min(int a, int b){
if(b < a){
return b;
}else{
return a;
}
}
int judge_max(int a, int b){
if(a < b){
return b;
}else{
return a;
}
}
int main(void){
int a, b, c, x, y, sum1 = 0, sum2 = 0, sum3 = 0, min;
scanf("%d""%d""%d""%d... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_191708/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_191708/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,x,y,ans=0;
int i,j;
scanf("%d%d%d%d%d",&a,&b,&c,&x,&y);
j=(x>y?x:y);
for(i=0;i<=j;i++){
if(x-i>0&&y-i>0)
ans+=((a+b>2*c)?2*c:a+b);
else if(x-i<1&&y-i>0)
ans+=((b>2*c)?2*c:b);
else if(x-i>0&&y-i<1)
ans+=((a>2*c)?2*c:a);
}
printf("%d\n"... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_191751/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_191751/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,x,y;
int i,j;
int cost=0;
scanf("%d %d %d %d %d",&a,&b,&c,&x,&y);
while( x > 0 && y > 0){
if( a + b > c*2 ) cost += c + c;
else cost += a + b;
x--; y--;
}
while( x > 0 ){
if( a > c*2 ) cost += c + c;
else ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_191795/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_191795/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
typedef long long ll;
int main(){
int n;
char a[100] = {0};
scanf("%d", &n);
int ans = 1;
for(int i = 2; i <= n; i *= 2){
ans = i;
}
#if 0
int j;
for(int i = 1; i <= n; ++i){
j = i;
for(;;){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_191838/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_191838/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
scanf("%d", &n);
if (n == 1)
{
printf("1");
return 0;
}
int ans = 2;
while (ans <= n)
{
ans *= 2;
}
if (ans != n)
{
ans /= 2;
}
printf("%d", ans);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_191881/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_191881/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
scanf("%d",&n);
if(n!=1){
int m_num=0;
int m_time=0;
for(int i=n;i>0;i--){
if(i%2==0){
int cnt=0;
int mem=i;
while(mem%2==0){
mem/=2;
cnt++;
}
if(cnt>m_time){
m_time=cnt;
m_num=i;
}
}
}
printf("%d\n... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_191924/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_191924/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
scanf("%d",&N);
int i,judge,two=1;
for(i=0;i<7;i++){
if(N>=two){
judge=two;
two*=2;
}
else break;
}
printf("%d",judge);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_191968/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_191968/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[100003],b[100003],c[100003];
long count=0,i;
scanf("%s",a);
scanf("%s",b);
for(i=0;a[i]!='\0';i++)
c[i]='0';
c[i]='\0';
for(i=0;a[i]!='\0';i++)
if(a[i]!=b[i])
count++;
if(count%2!=0)
{
printf("impossible");
return 0;
}
count/=2;
for(i=0;a[i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_19201/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_19201/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 N, i;
int main(){
scanf("%d", &N);
i=1;
do{
if(N<i){break;}
}while(i<<=1);
printf("%d\n", i>>1);
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_192060/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_192060/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i,j,N,max;
while(~scanf("%d",&N))
{
max=1;
if(N==1) printf("%d\n",max);
else
{
for(i=1;; i++)
{
j=pow(2,(double)i);
if(N>=j) max=j;
else break;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_192110/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_192110/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 n;
int c;
int m;
int k;
m = 0;
c = 0;
scanf("%d", &n);
for(k = n; k > 0; k--){
while(k % 2 == 0){
c++;
k /= 2;
if(m < c){
m = c;
}
}
}
printf("%d", (int)pow(2, c));
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_192154/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_192154/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 = 0;
int a = 0;
int b = 0;
int max = 0;
int tmp = 0;
scanf(" %d", &n);
for (int i = 1; i < n+1; i++){
a = i;
b = 0;
while (1){
if (a % 2 != 0){
//printf("%d\n", b);
break;
}
else{
a /= 2;
b++;
//printf("%d\n", b);
}
}
if (max ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_192198/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_192198/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
ll GCD(ll a, ll b) {
return (b == 0) ? a : GCD(b, a % b);
}
ll LCM(ll a, ll b) {
ll g = GCD(a,b);
return (a/g) * b;
}
int main() {
int N;
scanf("%d", &N);
ll res = 1, t;
for (int i = 0; i < N; ++i) {
scanf("%lld", &t);
res = LCM(res, ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_192248/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_192248/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 long int gcd(long long int n1,long long int n2);
int main(void)
{
int n,i;
scanf("%d",&n);
long long t[n],gcm,maxgcm;
scanf("%lld",&t[0]);
maxgcm=t[0];
for(i=1;i<n;i++){
scanf("%lld",&t[i]);
gcm=t[i]*(t[i-1]/gcd(t[i],t[i-1]));
maxgcm=gcm*(maxgc... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_192299/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_192299/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 long int gcd(long long int x, long long int y) {
return y ? gcd(y, x % y) : x;
}
long long int lcm(long long int x, long long int y) {
return x/gcd(x, y)*y;
}
int main()
{
int N, i;
long long int ans = 1LL;
long long int T;
scanf("%d", &N);
for (i = 0; i < N; i++... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_192341/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_192341/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
int main(){
char s[99];
scanf("%s",s);
int n=strlen(s);
s[n-8]=0;
puts(s);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_192392/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_192392/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 str[50];
scanf("%s",str);
str[strlen(str)-8]='\0';
printf("%s",str);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_192442/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_192442/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
scanf("%d", &a);
printf("%d", a * 800 - (a / 15 * 200));
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_192493/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_192493/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,x,y;
scanf("%d",&n);
x=n*800;
y=(n/15)*200;
x=x-y;
printf("%d\n",x);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_192536/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_192536/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, number = 0, i, j;
int *ptr, **mass;
int *goodCar;
scanf("%d", &n);
ptr = malloc(n * n * sizeof(int));
goodCar = malloc(n * sizeof(int));
mass = malloc(n * sizeof(int*));
for(i = 0; i < n; i++) {
mass[i] = &ptr[i * n];
goodCar[i] = 0;
}
for(i =... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_19258/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_19258/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include<stdio.h>
#include<string.h>
int main(void){
int A,B,C,D,E,N,M,x,y,cou=0,cou2,v[1000000],w[1000000],min_i,en=0;
char S[10],W[10],s[10],X,Y;
scanf("%d",&A);
printf("%d",A*800-(A/15)*200);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_192622/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_192622/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,ans=0;
scanf("%d",&a);
if(a>=0 && a<15) ans=a*800;
else if(a>=15) ans=a*800-(a/15)*200;
printf("%d\n",ans);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_192666/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_192666/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,get;
scanf("%d",&n);
get=(n/15)*200;
printf("%d\n",n*800-get);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_192723/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_192723/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
scanf("%d", &a);
int x = a * 800;
int y = a / 15;
printf("%d\n",x - y * 200);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_192774/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_192774/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32: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 3107 Spot The Difference
// 2019.9.23 bal4u
#include <stdio.h>
//// 入出力関係
#if 1
#define gc() getchar_unlocked()
#define pc(x) putchar_unlocked(x)
#else
#define gc() getchar()
#define pc(x) putchar(x)
#endif
int in() { // 整数の入力
int n = 0, c = gc();
do n = 10*n + (c & 0xf), c = gc(); while (c >= '0');
retur... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_192817/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_192817/source.c"
target datalayout = "e-m:e-p270: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<string.h>
int main(void){
int n,i,j,flag,k;
char str[1001],ch[8]="Hoshino";
scanf("%d",&n);
scanf("%c",&str[0]);
for(k=0;k<n;k++){
scanf("%[^\n]%*c",str);
for(i=0;i<strlen(str);i++){
flag=0;
for(j=0;j<7;j++){
if(str[i+j]==ch[j])flag++;
}
if(flag==7)st... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_192875/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_192875/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <stdbool.h>
//#include <limits.h>
//#include <math.h>
int main() {
long n;
scanf("%ld", &n);
if (n == 2) {
printf("1\n");
return 0;
}
long ans = 2;
for (long i=2; i*i<=n; i++) {
if (i*i == n-1)
ans++;
else if ((... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_192932/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_192932/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,m,cnt=1;
scanf("%d%d",&n,&k);
m=k;
while(m<=n){
m*=k;
cnt++;
}
printf("%d",cnt);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_192983/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_192983/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
/*
* kadai3_3
* kamecha
*/
#include<stdio.h>
int main(void){
int num, base;
scanf("%d %d", &num, &base);
/*
* 何桁かを求めれば良いので何回割れるかを求めればOK
*/
int ans = 0;
while(num > 0){
num /= base;
ans++;
}
printf("%d\n", ans);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_193025/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_193025/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
/* ex3_3
kohei_suzuki */
#include <stdio.h>
#include <math.h>
int main(void){
int num, base; //整数num,進数base
int dig = 0; //桁数dig
scanf("%d %d",&num, &base); //num,base入力
while(num >= pow(base,dig)){ //numとbase^digを比較して桁数を求める
dig += 1; //digを1ずつ増やして繰り返し比較する
}
printf("%d\n",dig); /... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_193069/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_193069/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
//ex3_2
//TKC001
#include<stdio.h>
#include<math.h>
int main(void){
double N, K, logKN;
int digits;
scanf("%lf", &N);
scanf("%lf", &K);
logKN = log(N) / log(K);
digits = logKN;
printf("%d", digits+1);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_193119/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_193119/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>
#pragma warning(disable : 4996) //_CRT_SECURE_NO_WARNINGS
int calc(long n, long k,int cnt) {
if (n < k)return cnt+1;
return calc(n / k, k, cnt+=1);
}
int main(void) {
long n, k;
int cnt = 0;
scanf("%ld%ld", &n, &k);... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_193162/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_193162/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, i=0;
scanf("%d%d", &N, &K);
while(N){
N /= K;
i++;
}
printf("%d\n", i);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_193205/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_193205/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32: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.