Search found 2 matches

by fislam
Sat Sep 27, 2014 9:12 am
Forum: Volume 4 (400-499)
Topic: 406 - Prime Cuts
Replies: 187
Views: 60515

Re: 406 - Prime Cuts

why wa ??
#include<stdio.h>
#include<iostream>
#include<math.h>
#include<stdlib.h>
using namespace std;
void prime();
const int n_max = 1000;
int finalarr[n_max+1],getarr[175];
bool yprime[n_max+1];

void prime(){
yprime[1] = true;
for (int i = 2, e = static_cast<int>(sqrt(static_cast<double>(n ...
by fislam
Fri Sep 19, 2014 5:00 am
Forum: Volume 118 (11800-11899)
Topic: 11805 - Bafana Bafana
Replies: 23
Views: 12219

Re: 11805 - Bafana Bafana

why i get wa
#include<iostream>
#include<cstdio>
int main(){

int n,p,k,remind,i,counter,l;
scanf("%d",&l);
for(int f=1;f<=l;f++){
scanf("%d%d%d",&n,&k,&p);
remind=p%n;
if(remind==0)
remind=n;
counter=k%n;;
int u=remind;
for(i=1;i<=u;i++){
if(counter==n)
{
if(i!=u){
counter=1;
}
}
else ...

Go to advanced search