Source_Code stringlengths 69 484k | IR_Original stringlengths 2.05k 17.9M |
|---|---|
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
/*--------構造体定義-------*/
typedef struct wordcard{
int num;
struct wordcard *left;
struct wordcard *right;
}word;
/*--------------------------*/
/*-------文字列を数字へ-------*/
int henkan(char str[]){
int i=0;
while(str[i]!='\0'){
switch(str[i]){
case 'A':str[i]... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246254/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246254/source.c"
target datalayout = "e-m:e-p270: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.wordcard = type { i... |
#include <stdio.h>
#include <string.h>
#define M 1000000
#define L 14
char H[M][L];
int GetChar(char ch){
if(ch=='A') return 1;
else if(ch=='C') return 2;
else if(ch=='G') return 3;
else if(ch=='T') return 4;
else return 0;
}
int h1(int key){
return key % M;
}
int h2(int... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246298/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246298/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@H = dso_local global [1000... |
#include<stdio.h>
#include<string.h>
#define M 999721/* your task*/
#define NIL '\0'
#define L 14
char H[M][L]; /* Hash Table */
int getChar(char ch){
if ( ch == 'A') return 1;
else if ( ch == 'C') return 2;
else if ( ch == 'G') return 3;
else if ( ch == 'T') return 4;
}
/* convert a string into an integer ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246362/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246362/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@H = dso_local global [9997... |
#include <stdio.h>
#include <string.h>
#define MAX 244140625
int Hash[MAX];
char s[13];
int getChar(char);
int getKey();
int find();
void insert();
int main(){
int n;
char com[7];
scanf("%d" ,&n);
while(n--){
scanf("%s %s" ,com ,s);
if(com[0] == 'i'){
insert();
}else{
if(find()){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246405/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246405/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
/* ダブルハッシュ法を使うのでハッシュテーブルのサイズは素数である必要がある */
#define HASH_TABLE_LEN 1046527
/* Hash_tableash Table */
/* グローバル宣言:ゼロクリアされているため初期化は不要 */
static char Hash_table[HASH_TABLE_LEN][13];
/* 文字列から数値に変換 */
int getChar(char ch)
{
if (ch == 'A')
return 1;
else if (ch == 'C')
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246456/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246456/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@Hash_table = internal glob... |
#include <stdio.h>
int main(void)
{
long long int n, s, pi, qi, i, buy[100001], sell[100001], temp, k;
scanf("%lld %lld", &n, &s);
char di;
for (i = 0; i < 100001; i++)
{
buy[i] = 0;
sell[i] = 0;
}
for (i = 0; i < n; i++)
{
scanf(" %c %lld %lld", &d... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2465/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2465/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr co... |
#include<stdio.h>
#include<string.h>
#define M 1000001
#define L 14
#define NTL (-1)
char H[M][L];
int getChar(char ch){
if(ch=='A')return 1;
else if(ch=='C') return 2;
else if(ch=='G')return 3;
else if(ch=='T')return 4;
else return 0;
}
long long getKey(char str[]){
long long sum=0,p=1,i;
for(i=0;i<s... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246542/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246542/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@H = dso_local global [1000... |
#include <stdio.h>
#include <string.h>
#define M 1000213
#define L 14
char H[M][L]; /* Hash Table */
int getChar(char ch){
if ( ch == 'A') return 1;
else if ( ch == 'C') return 2;
else if ( ch == 'G') return 3;
else if ( ch == 'T') return 4;
}
/* convert a string into an integer value */
long long getKey(ch... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246586/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246586/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@H = dso_local global [1000... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define L 12
#define N 1000000
char H[N][L];
int getChar(char);
long long getKey(char *);
int h1(int);
int h2(int);
int find(char *);
int insert(char *);
int main(void){
char cmd[7],str[L];
int n;
int i;
for(i = 0; i < N; i++) H[i][0] = '\0';
scanf... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246629/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246629/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@H = dso_local global [1000... |
#include <stdio.h>
#include <string.h>
#define M 1000000/* your task*/
#define L 14
char H[M][L]; /* Hash Table */
int getChar(char ch){
if ( ch == 'A'){
return 1;
}
else if ( ch == 'C'){
return 2;
}
else if ( ch == 'G'){
return 3;
}
else if ( ch == 'T'){
return 4;
}
else{
return 5;
}
}
/* conve... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246672/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246672/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@H = dso_local global [1000... |
#include <stdio.h>
#include <stdlib.h>
typedef struct Node* NodePointer;
struct Node {
NodePointer next[5];
};
int conv(char c) {
switch(c) {
case '\0':return 0;
case 'A': return 1;
case 'C': return 2;
case 'G': return 3;
case 'T': return 4;
}
return -1;
}
NodePointer makeNode() {
int i;
Nod... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246715/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246715/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
#define M 1000000
#define L 14
int H[M]; /* Hash Table */
const int getChar[] = {1,0,2,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,4};
/* convert a string into an integer value */
int getKey(char str[]){ // max = 4^12-1 = 16777215
int i, sum = 0, p = 1;
for (i = 0; str[i]!='\n'; i++) ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246759/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246759/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@getChar = dso_local local_... |
#include<stdio.h>
#include<string.h>
#define M 1046527
#define NIL (-1)
#define L 14
char h[M][L];
int getChar(char ch){
if(ch=='A')return 1;
else if(ch=='C')return 2;
else if(ch=='G')return 3;
else if(ch=='T')return 4;
else return 0;
}
long long getkey(char str[]){
long long sum=0,p=1,i;
for(i=0;i<strlen... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246801/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246801/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@h = dso_local global [1046... |
#include<stdio.h>
#include<string.h>
#define N 12
#define M 1000000
char hash[M][N];
int getChar(char t){
if (t=='A')return 1;
else if(t=='C')return 2;
else if(t=='G')return 3;
else if(t=='T')return 4;
else return 0;
}
int getint(char str[]){
int sum=0,i,a=1;
for (i=0;i<strlen(str);i++){
sum+=a*(ge... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246845/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246845/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@hash = dso_local global [1... |
#include<stdio.h>
#include<string.h>
char hash[1<<21],Dictionary[256];
int main(int argc,char *argv[]){
int flg;
int valume,x,y;
char c;
Dictionary['T'] = 1;
Dictionary['G'] = 2;
Dictionary['C'] = 3;
Dictionary['A'] = 4;
scanf("%d",&valume);
getchar();
while(valume--){
x = 0;
y = 1;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246896/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246896/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@Dictionary = dso_local loc... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define N 12
#define M 13
#define MOD 1000003
#define Gard 0
void InsertWord(char []);
int ChangeNum(char );
long long Convert(char []);
int CalH(int );
int CalAnoH(int );
int SearchWord(char []);
char Hash[MOD][M];
int main(){
int loop,judge=0,i;
char ord... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246939/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246939/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
int sum=0,a;
int b[7]={0};
while(scanf("%d",&n)&&n!=0){
for(i=0;i<n;i++){
scanf("%d",&a);
if(a<60)
b[a/10]++;
else
b[6]++;
}
for(i=0;i<7;i++){
printf("%d\n",b[i]);
}
for(i=0;i<7;i++)
b[i]=0;
}
return 0 ;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246982/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246982/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,m,d[8];
for(;scanf("%d",&n)&&n;){
for(i=0;i<7;i++)d[i]=0;
for(;n>0;n--){
scanf("%d",&m);
if(m<10)d[0]++;
else if(m<20)d[1]++;
else if(m<30)d[2]++;
else if(m<40)d[3]++;
else if(m<50)d[4]++;
else if(m<60)d[5]++;
else d[6]++;
}
for(i=0;i<7;i++)printf(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247024/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247024/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
while(1){
scanf("%d",&n);
if(n==0)break;
int a;
int age[7];
for(int i=0;i<7;i++){
age[i]=0;
}
for(int i=0;i<n;i++){
scanf("%d",&a);
if(a>=60){
age[6]+=1;
}
else{
age[a/10]+=1;
}
}
for(i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247075/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247075/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 cmp(const void *a,const void *b)
{
return *(int*)a-*(int*)b;
}
int main()
{
int n;
scanf("%d",&n);
int a[n];
int i;
int count=0;
int ans=0;
int tmp;
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
qsort(a,n,sizeof(int),cmp);
int j=0,k=0;
whil... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247118/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247118/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, j, ans;
int a[16666670*2] = {};
long int k;
scanf("%d", &n);
for (int i = 0; i < n; i++)
{
scanf("%ld", &k);
int s = k / 30, t = k % 30;
if ((a[s] & (0b1 << t)) == 0)
{
a[s] = a[s] | (0b1 << t);
ans++;
}
else
{
a[s] = a[s] & ~(0b1 << t);
ans--;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247183/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247183/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(){
while(1){
int total, kaisuu;
int i=1;
int score, nowscore=0;
scanf("%d",&total);
if(total==0){
break;
}
kaisuu=total/4;
while(i <= kaisuu){
scanf("%d",&score);
nowscore += score;
i++;
}
printf("%d\n",nowscore);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247226/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247226/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 sum, i, n, t;
while (1) {
scanf("%d", &n);
if (n == 0)
return 0;
for (sum = 0, i = 0; i < n / 4; i++) {
scanf("%d", &t);
sum += t;
}
printf("%d\n", sum);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247305/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247305/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ord(const void * x, const void * y){
int a = *((int *) x), b = *((int *) y);
if (a<b)
return -1;
if (a>b)
return 1;
return 0;
}
int main() {
int n;
scanf("%d", &n);
int vec[n];
for (int i = 0; i < n; ++i)
scanf("%d", &vec[i]);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247363/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247363/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 asc(const void *a, const void *b) {
return *(int *)a - *(int *)b;
}
int main(){
int A[200000],N,i=0,i2=0,t;
/*数を入力*/
scanf("%d", &N);
for(i=0;i<N;i++)scanf("%d",A+i);
qsort(A, N, sizeof(int), asc);
for (i=0;i<N-1;i++){
/* code */
if(A[i]==A[i+1]){
printf("NO\n"); ret... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247406/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247406/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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>
#include <string.h>
#include <stdlib.h>
#define ll long long
#define scl(a) scanf("%ld",&a)
#define sc(a) scanf("%lld",&a)
#define sd(a) ll a; sc(a)
#define test(a) sd(a); while(a--)
#define pf(a) printf("%lld\n",a)
#define pfl(a) printf("%ld\n",a)
#define rp(l,i,n) for(i=l;i<n;i++)... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_24750/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_24750/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 c = 0; //count prime numbers
void pri_num(int a);
int main () {
int a,times,i;
scanf ("%d",×); //how many times
for (i = 0;i < times;i ++) {
scanf ("%d",&a);
pri_num(a);
}
printf ("%d\n",c);
return 0;
}
void pri_num(int a) {
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247543/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247543/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@c = dso_local local_unname... |
#include <stdio.h>
#include <math.h>
int isprime(long L){
long i=3;
long Ls = (long)sqrt(L);
if (!(L%2)) return 0;
while (i<=Ls) {
if(!(L%i))return 0;
i+=2;
}
return 1;
}
int main(void) {
int N,n,t=0;
long L;
scanf("%d\n",&N);
for(n=0;n<N;n++) {
scanf("%ld\n",&L);
if (L==2) t+... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247587/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247587/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
int main(){
int n, a[10000], count, i ,j;
scanf("%d" ,&n);
for(i = 0; i < n; i++){
scanf("%d" ,&a[i]);
if(a[i] == 2){
count++;
continue;
}
else if(a[i] < 2 || a[i] % 2 == 0) continue;
j = 3;
while(j <= sqrt(a[i])){
if(a[i] % j == 0... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247644/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247644/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 isprime(int x){
if(x==2) return 1;
if(x<2||x%2==0) return 0;
int i;
for(i=3;i<=sqrt(x);i+=2) //????????????????????????????????????
if(x%i==0)
return 0;
return 1;
}
int main(void){
int n,x,i,num=0;
scanf("%d",&n);// ??´??°????????°
for (i = 0;i < n;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247695/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247695/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
#define N 10000
int main()
{
int i, num, ans=0, count, sign=0;
int array[N];
scanf("%d", &num);
for( i=0; i<num; i++){
scanf("%d", &array[i]);
}
for( i=0; i<num; i++){
if( array[i] == 2 ){
ans++;
continue;
}
if( array[i] < 2 || array... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247738/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247738/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
#define N 10000
int main(){
int n,num[N],i,j,count=0;
scanf("%d",&n);
for(i=0;i<n;i++)scanf("%d",&num[i]);
for(i=0;i<n;i++){
if(num[i]==2)continue;
if(num[i]%2==0){
count+=1;
continue;
}
for(j=3;j<=sqrt(num[i]);j+=2){
if(num[i]%j==0){
cou... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247781/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247781/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,j,primenum=0,x;
scanf("%d",&n);
primenum=n;
for(i=0;i<n;++i){
scanf("%d",&x);
for(j=2;j*j<=x;j++){
if(x%j==0){
primenum--;
break;
}
}
}
printf("%d\n",primenum);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247824/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247824/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 PRIMES[10000] = {0};
void make_prime() {
PRIMES[0] = 2;
int i, j;
for (i = 3; i < 10000; ++i) {
for (j = 0; PRIMES[j] != 0; ++j) {
if ((i % PRIMES[j]) == 0) {
break;
}
}
if (PRIMES[j]) {
continue;
} else {
PRIMES[j] = i;
}
}
return;
}
int main(void)
{
int i, j... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247868/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247868/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@PRIMES = dso_local local_u... |
#include<stdio.h>
#include<math.h>
int main(){
int n,a[10000],cnt=0,i,j,k=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&a[i]);
}
for(i=0;i<n;i++){
k=0;
if(a[i]==2){
cnt+=1;
continue;
}
if(a[i]%2==0){continue;}
j=3;
while(j<=sqrt((double)a[i])){
if(a[i]%j==0){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247925/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247925/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
#define N 10000
int isPrime(int);
int main(){
int x,i,j,u,c=0,count=0;
int s[N];
scanf("%d",&x);
for(i=0;i<x;i++){
scanf("%d",&s[i]);
}
for(i=0;i<x;i++){
u = isPrime( s[i] );
if(u == 1) count++;
}
printf("%d\n",count);
return 0;
}
int isPrime(int ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247976/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247976/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
#include<math.h>
bool IsPrime(int num){
int i;
double sqrtNum;
sqrtNum= sqrt(num);
if (num < 2) return false;
else if (num == 2) return true;
else if (num % 2 == 0) return false;
for (i = 3; i <= sqrtNum; i += 2){
if (num % i == 0)
return false;
}
retur... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248018/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248018/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 judge(int num){
int j = 3;
if (num==2) {
return 1;
} else if (num<2 || num%2==0) {
return 0;
} else {
while (j<=sqrt(num)) {
if (num%j==0) {
return 0;
}
j=j+2;
}
return 1;
}
}
int main(){
int n, num, i;
int count = 0;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248069/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248069/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
int main(){
int n, t, count, i, j;
int num[10000];
scanf("%d",&n);
for(i=0; i < n; i++){
scanf("%d",&num[i]);
}
count = n;
for (i = 0; i < n; i++){
if (num[i] == 2) {
}
else if(num[i] % 2 == 0){
count--;
}
else{
t = sqrt(num... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248111/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248111/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
int main(void){
int i,j,n;
int sum=0;
while(scanf("%d",&n)!=EOF){
j=0;
for(i=2;i<=sqrt(n);i++){
if(n%i==0){
j=1;
break;
}
}
if(j==0)sum++;
}
printf("%d\n",sum);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248162/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248162/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
#define N 10000
int keisan(int);
int main(){
int i,j,num;
int S[N];
int count = 0;
while(1){
scanf("%d",&num);
if(num >= 1 && num <= N)break;
}
for(i = 0;i<num;i++){
scanf("%d", &S[i]);
}
for(i = 0;i<num;i++){
if(keisan(S[i]) ==... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248205/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248205/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 Sosu(int N){
int i=3;
if(N==2)return 1;
if(N<2 || N%2==0)return 0;
while(i<=sqrt(N)){
if(N%i==0)return 0;
i=i+2;
}
return 1;
}
int main(void){
int N;
int n,i;
int S=0,c=0;
while(1){
scanf("%d",&n);
if(n>=1 && n<=10000)break;
}
for(i=0 ; i<n ; i++){
while(1){
scanf("%d",&... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248249/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248249/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x=0,n;
int i,j;
int bool=0,check=0;
double sqrtN;
scanf("%d",&n);
int A[n];
for(i=0;i<n;i++){
scanf("%d",&A[i]);
}
for(i=0;i<n;i++){
if(A[i]==2) {
x++;
continue;
}
else if(A[i]%2==0) continue;
sqrtN = sqrt(A[i]);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248313/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248313/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
int main(){
int N,i,j,num=0,y;
scanf("%d",&N);
int A[N];
for(i=0;i<N;i++){
scanf("%d",&A[i]);
}
/*prime number check*/
for(i=0;i<N;i++){
y=0;
if(A[i]==2){
num++;
continue;
}
if((A[i]%2)==0)continue;
for(j=3;j<=sqrt(A[i]);j+=2){
if((A[i]%j)==0){
y=1;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248364/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248364/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 prime_check(int x){
for(int i=2;i<=sqrt(x);i++)
if(x%i == 0)return 0;
return 1;
}
int main(){
int n,i,x;
int ans=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&x);
if(prime_check(x))
ans++;
}
printf("%d\n",ans);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248407/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248407/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 prime(int x){
int i;
if(x < 2) return 0;
if(x == 2) return 1;
if(x % 2 == 0) return 0;
for(i = 3;i * i <= x;i += 2)
if(x % i == 0) return 0;
return 1;
}
int main(){
int n, c = 0, a;
scanf("%d", &n);
while(n--){
scanf("%d", &a);
c += prime(a);
}
printf("%d\n",... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248458/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248458/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <memory.h>
#include <math.h>
#define NUM 10000000
unsigned int prime[NUM+2];
unsigned int prime_value[700000];
unsigned int prime_size = 0;
void create_prime(void)
{
unsigned int i, j;
unsigned int size;
unsigned int sq_num = (int)sqrt((double)NUM);
memset((char*)prime,... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248508/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248508/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@prime_size = dso_local loc... |
/*
* FileName: prime_numbers
* CreatedDate: 2020-04-02 17:54:49 +0900
* LastModified: 2020-04-05 17:06:07 +0900
*/
#include <stdio.h>
#include <math.h>
int main(void){
int n;
scanf("%d",&n);
int box,count=0;
int flag=0;
for(int i=0;i<n;i++){
scanf("%d",&box);
for(int j=2;(d... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248551/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248551/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 so(int A)
{
int i;
int count=0;
if( A == 2 )return 1;
if( A < 2 || A % 2 == 0 )return 0;
for( i = 3 ; i*i <= A; i+=2){
if( A % i == 0)return 0;
}
return 1;
}
int main()
{
int a;
int i;
int n;
int A;
int count = 0;
scanf("%d",&n);
for( i = 0 ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248595/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248595/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 isPrime(int);
int main(){
int a[100000];
int i,n,x;
int count=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&x);
if(isPrime(x)){
count++;
}
}
printf("%d\n",count);
return 0;
}
int isPrime(int x){
int n,i;
if(x==2){
return 1;
}
if(x<2||x%2==0){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248638/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248638/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 isPrime(int x){
int i;
if(x < 2) return 0;
else if(x == 2) return 1;
else if(x % 2 == 0) return 0;
for(i = 3;i * i <= x;i +=2){
if(x % i == 0) return 0;
}
return 1;
}
int main(){
int kosuu,n,i,count = 0;
scanf("%d",&kosuu);
for(i = 0;i < kosuu;i++){
scanf("%d",&n)... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248681/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248681/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
#define n 10000
int isprime(int);
int main(){
int num,array[n],count=0,i;
scanf("%d",&num);
for(i=0;i<num;i++){
scanf("%d",&array[i]);
if(isprime(array[i])==1)count++;
}
printf("%d\n",count);
return 0;
}
int isprime(int x){
int i;
if(x==2)return 1;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248731/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248731/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 isPrime(int x)
{
int i;
if(x<2)return 0;
else if(x==2)return 1;
if(x%2==0)return 0;
for(i=3;i<=sqrt(x);i+=2)
{
if(x%i==0)return 0;
}
}
int main(void)
{
int z,n,i;
scanf("%d",&n);
z=0;
int x[n];
for(i=0;i<n;i++)
{
scanf("%d", &x[i]);
if(isPrime(x[i]))
{
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248782/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248782/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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
is_prime(int x)
{
int i, lim;
if (x <= 1)
return 0;
if (x == 2)
return 1;
if (!(x & 1))
return 0;
lim = (int)sqrt(x);
for (i = 3; i <= lim; i += 2)
if (!(x % i))
return 0;
return 1;
}
int
main(void)
{
int i, n, x, ps = 0;
scanf("%d", &n);
for (i = 0... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248825/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248825/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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>
// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_1_C
int is_prime(int x) {
if (x == 2)
return 1;
if (x % 2 == 0)
return 0;
int i;
for (i = 2; i < (int)sqrt(x) + 1; i++) {
if (x % i == 0)
return 0;
}
retur... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248869/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248869/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 isprime(int);
int main(){
int i,j,n,count=0,mat[10000],judge;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&mat[i]);
}
for(i=0;i<n;i++){
judge=isprime(mat[i]);
if(judge==1)count++;
else if(judge==2);
}
printf("%d\n",count);
return 0;
}
int isprime(i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248911/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248911/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
#define N_MAX 10000
#define TRUE 1
#define FALSE 0
int isPrime(int);
int main(){
int i, n, count = 0, x[N_MAX];
scanf("%d", &n);
for(i = 0; i < n; i++){
scanf("%d", &x[i]);
}
for(i = 0; i < n; i++){
count += isPrime(x[i]);
}
printf("%d\n", count);
ret... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248955/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248955/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
#define N 10000
int isPrime(int);
int main(){
int i,count=0,n,A[N];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&A[i]);
}
for(i=0;i<n;i++){
if(isPrime(A[i]) == 1)
count++;
}
printf("%d\n",count);
return 0;
}
int isPrime(int x){
int i=3;
if(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249004/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249004/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 isPrime(int);
int main(){
int n, c = 0,i = 0;
scanf("%d",&n);
int array[n];
for(i = 0; i < n; i++) scanf("%d", &array[i]);
for(i = 0; i < n; i++){
if(isPrime(array[i]) == 1) c++;
}
printf("%d\n",c);
return 0;
}
int isPrime(int x){
int i;
if(x == 2) ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249048/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249048/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 sosuu(int x){
int i;
if ( x < 2 )
return 0;
else if ( x == 2 )
return 1;
if ( x % 2 == 0 )
return 0;
for ( i = 3; i*i <= x; i+=2 ){
if ( x % i == 0 )
return 0;
}
return 1;
}
int main(){
int n,x,i;
int count = 0;
scanf("%d", &n);
for ( i = 0; i < n; i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249091/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249091/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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<stdbool.h>
#include<assert.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))
#define rrep(i,l,r)for(ll i=(l);i>=(r);i--)
#define INF (1LL<<60)
#defin... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249141/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249141/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
int main(){
int n,ax,ay,bx,by,cx,cy;
double t,x,y;
scanf("%d%d%d%d",&ax,&ay,&bx,&by);
scanf("%d",&n);
while(n--){
scanf("%d%d",&cx,&cy);
t=((ax-bx)*(ax-cx)+(ay-by)*(ay-cy))/(pow(ax-bx,2)+pow(ay-by,2));
x=2*(ax+t*(bx-ax))-cx;
y=2*(ay+... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249185/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249185/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <math.h>
#define P 1000000007
int comp(const void *a, const void *b){return *(int*)a-*(int*)b;}
char s[100001];
int a[100000];
int main(void){
scanf("%s", s);
int n=strlen(s), i;
int f,... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249228/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249228/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define MAX 100010
int main()
{
int n;
int i,j;
char s[MAX];
int ans[MAX]={0};
int rcount=0,lcount=0;
int lcountarr[MAX]={0};
int rlpoint[MAX]={0};
int rlpointnum=0;
scanf("%s",s);
n=strlen(s);
for(i=0;i<n;i++)
{... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249279/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249279/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32: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_249321/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249321/source.c"
target datalayout = "e-m:e-p270: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_heap = type {... |
#include<stdio.h>
#include<string.h>
int main(void)
{
char str[81];
int i;
while (fgets(str,81,stdin) != NULL) {
while (1) {
for (i = 0; i < strlen(str); i++) {
if (str[i] >= 'a' && str[i] <= 'z')
str[i] = (str[i] - 'a' + 1) % 26 + 'a';
}
if (strstr(str, "this") != NULL) break;
else if (strst... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249394/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249394/source.c"
target datalayout = "e-m:e-p270: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>
void shift(char x[]){
int n=strlen(x),i;
for(i=0;i<n;i++){
if('a'<=x[i] && x[i]<='y')x[i]++;
else if(x[i]=='z')x[i]='a';
}
}
int check(char x[]){
if(strstr(x,"the")!=NULL)return 1;
if(strstr(x,"that")!=NULL)return 1;
if(strstr(x,"this")!=NULL)return 1;
return 0;
}
i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249495/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249495/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,a,h,p,q,i,j,hmax;
for(;;){
scanf("%d %d %d", &n, &m, &a);
if(n==0&&m==0&&a==0) break;
int line[100][1000]={0};
hmax=0;
for(i=0;i<m;i++){
scanf("%d %d %d", &h, &p, &q);
line[p-1][h-1]=1;
if(h>hmax) hmax=h;
}
for(i=hmax-1;i>=... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249581/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249581/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,Ai,Bi,j,n,max=0;
scanf("%d", &n);
for(i=0;i<n;i++)
{
scanf("%d %d" ,&Ai,&Bi);
if(max<=Ai)
{
max=Ai;
j=Bi;
}
}
printf("%d",max+j);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249631/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249631/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,h[100001];
int i,j,x=0,y[100001];
scanf("%d %d",&n,&k);
for(i=0;i<n;i++) scanf("%d",&h[i]);
for(i=0;i<=n;i++) y[i]=1000000000;
y[0]=0;
for(i=0;i<n-1;i++){
for(j=1;j<=k;j++){
x=h[i]-h[i+j];
if(x<0) x=-x;
if(i+j<n){
if(y[i+j]>x+y[i]){
y[i+j]=x+y[i];
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249675/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249675/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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<stdint.h>
#include<stdbool.h>
#include<math.h>
#include<time.h>
#define ll long long
#define min(a,b) ((a)>(b)?(b):(a))
#define max(a,b) ((a)>(b)?(a):(b))
int n, k, h[111111], x[111111][111];
int nyan(int i, int j){
if(x[i][j] >= 0)return x[i][j];
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249732/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249732/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@x = dso_local local_unname... |
#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_249783/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249783/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 INF 1E9
int n,k,*h;
long *dp;
int calcCost(int from,int to)
{
if (h[from]>h[to]) return h[from] - h[to];
return h[to] - h[from];
}
int myMin(int a,int b)
{
return (a-b>0)?b:a;
}
void chMin(long *a,int b)
{
if (*a>b) *a = b;
return;
}
int main(void)
{
int i,j;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249833/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249833/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@h = dso_local local_unname... |
#include<stdio.h>
#include<math.h>
int main(void){
double x1, y1, x2, y2, distance;
scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2);
distance = sqrt((pow(x2-x1, 2) + pow(y2-y1, 2)));
printf("%f\n", distance);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249877/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249877/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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)
{
double a,b,p,q,d;
scanf("%lf %lf %lf %lf",&a,&b,&p,&q);
d=sqrt(1.0*(p-a)*(p-a)+(q-b)*(q-b));
printf("%f\n",d);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249970/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249970/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){
double x0,x1,y0,y1;
double dis;
scanf("%lf %lf %lf %lf",&x0,&y0,&x1,&y1);
dis=sqrt(pow(x1-x0,2)+pow(y1-y0,2));
printf("%.8f\n",dis);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250011/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250011/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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) {
double x1, y1, x2, y2;
double dx, dy;
scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2);
dx = x2 - x1; dy = y2- y1;
printf("%f\n", sqrt(dx*dx + dy*dy));
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250055/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250055/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 argc, const char * argv[]) {
double x1,x2,y1,y2,x;
scanf("%lf %lf %lf %lf",&x1,&x2,&y1,&y2);
x=(x1-y1)*(x1-y1)+(x2-y2)*(x2-y2);
printf("%f\n",sqrt(x));
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250105/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250105/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){
double x[3],y[3];
scanf("%lf %lf %lf %lf",&x[0],&y[0],&x[1],&y[1]);
x[2] = pow(x[0]-x[1],2);
y[2] = pow(y[0]-y[1],2);
printf("%.4f\n",sqrt(x[2]+y[2]));
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250149/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250149/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){
double x1,y1,x2,y2;
scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
printf("%.8f\n",sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)));
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250192/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250192/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
int main(){
double x1, y1, x2, y2, distance;
scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2);
distance=sqrt((pow(x2-x1, 2)+pow(y2-y1, 2)));
printf("%f\n", distance);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250235/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250235/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
int main()
{
double x1,x2,y1,y2;
scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
printf("%.8lf\n",(sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))));
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250279/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250279/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
int main(){
double x1,y1,x2,y2;
scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
printf("%lf\n",sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)));
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250321/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250321/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
int main()
{
double x1, y1, x2, y2;
double e;
scanf("%lf%lf%lf%lf", &x1, &y1, &x2, &y2);
e = (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
printf("%.8lf\n", sqrt(e));
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250365/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250365/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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() {
double x1, y1, x2, y2;
scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2);
printf("%lf\n", sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2)));
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250408/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250408/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){
double x1,y1,x2,y2;
scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
printf("%.8lf\n",sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)));
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250451/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250451/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 max_size (int)(2 * 1e5 + 1)
#define inf (int)(1e9)
int min(int a, int b){
return a <= b ? a : b;
}
int main(){
int i, j, N, dp_min;
char *S = (char *)malloc(sizeof(char) * max_size);
scanf("%s", S);
for(i = 0; S[i] != '\0'; i++){}
N = i;
int *S_num = (int *)malloc... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250509/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250509/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 v1, v2,l[10],distance,c;
double d;
int i;
while (scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",
&l[0], &l[1], &l[2], &l[3], &l[4], &l[5], &l[6], &l[7], &l[8], &l[9], &v1, &v2) != EOF) {
distance = 0;
c = 0;
for (i = 0; i < 10; i++) {
distance += l[i];
}
if (((do... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250552/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250552/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32: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 0034
*
* http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0034
*/
#include<stdio.h>
#define DEBUG 0
#define true 1
#define false 0
int meetat(int* input, int v1, int v2){
int total;
int i;
float fat;
int d;
total = 0;
for(i=0;i<10;i++)
total += input[i];
fat = total*1.0 / (v... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250602/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250602/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, x, y, z, N, count[10001] = {}, tmp;
scanf("%d", &N);
for (x = 1; x <= 100; x++) {
for (y = 1; y <= 100; y++) {
for (z = 1; z <= 100; z++) {
tmp = x * x + y * y + z * z + x * y + y * z + z * x;
if (tmp <= N) count[tmp]++;
}
}
}
for (i = 1; i <= N; i++) print... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250653/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250653/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 f[10001] = { 0 };
int ret = 6;
int x = 1, y = 1, z = 1;
for(x = 1;x <= 100;x++) {
for(y = x;y <= 100;y++) {
for(z = y;z <= n;z++) {
ret = x*x + y*y + z*z + x*y + y*z + z*x;
if(ret > n) continue;
if(x == y && y... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250697/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250697/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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);
if(n==2){
printf("2\n");
}
else{
printf("1\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25074/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25074/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
#include <ctype.h>
#define SIZE 100005
#define PI acosl(-1) //3.14159265358979323846264338327950L
#define rep(i, N) for (i = 0; i < N; i++) //制御変数iを用いてN回転
#define array(N, t) (t*)calloc(N, sizeof(t)) //t型N要素の1次元配列を動的確保後0クリア(freeを忘れずに)
#defin... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250783/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250783/source.c"
target datalayout = "e-m:e-p270: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>
#include<math.h>
int a;
int b;
double c;
int digits;
int main(){
while(scanf("%d %d", &a, &b)!=EOF) {
c = log10 (a + b);
if(ceil(c) == c){
digits = c+1;
printf("%d\n",digits);
}
else{
digits = ceil(c);
printf("%d\n",digits);
}
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250833/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250833/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 = 0 , b = 0 , c = 0 , keta = 0;
while(scanf("%d%d" ,&a ,&b) != EOF){
c = a + b;
while(c > 0){
keta++;
c = c / 10;
}
printf ("%d\n" ,keta);
a = 0 ; b = 0 ; c = 0 ; keta = 0;
}
return (0);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250877/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250877/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
//Bismillahir Rahmanir Rahim
#include<stdio.h>
// Code on phone
int main()
{
long long int n;
scanf("%lld",&n);
if (n==2) printf("2\n");
else printf("1\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25092/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25092/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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, c, d;
while(scanf("%d %d", &a, &b)!=EOF){
c=a+b;
d=0;
while(c>0){
c=c/10;
d++;
}
printf("%d\n", d);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250963/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250963/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 DATA_NUM (200)
int calc_digit(int);
int main(void)
{
int a, b;
while(scanf("%d %d\n",&a,&b)!=EOF)
{
printf("%d\n",calc_digit(a+b));
}
return 0;
}
int calc_digit(int x)
{
int i;
for(i=1; ; i++)
{
x = x/10;
if(x==0) break;
}
return i;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251005/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251005/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,sum;
int i;
while(scanf("%d %d",&a,&b)!=EOF){
sum=a+b;
for(i=1;sum/10!=0;sum/=10,i++){
}
printf("%d\n",i);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251049/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251049/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
while (scanf("%d %d", &a, &b) != EOF){
a = a + b;
b = 0;
do{
b++;
a /= 10;
}while (a != 0);
printf("%d\n", b);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251092/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251092/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32: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.