I know the trick of finding the repeated sequence of [the last digit of m] poweres n to get the same correct answer, but could anyone please explain why the last two digits of n is enough?Master wrote:Yes, I agree with seadoo.
one digit of m and two digits of n are enough.
M H Rasel
CUET Old Sailor
Search found 13 matches
- Wed Jan 21, 2004 9:47 am
- Forum: Volume 105 (10500-10599)
- Topic: 10515 - Powers Et Al.
- Replies: 124
- Views: 45380
- Sun Oct 19, 2003 4:52 am
- Forum: Volume 4 (400-499)
- Topic: 445 - Marvelous Mazes
- Replies: 93
- Views: 21967
- Tue Jun 03, 2003 5:56 am
- Forum: Volume 3 (300-399)
- Topic: 343 - What Base Is This?
- Replies: 72
- Views: 28334
- Mon Jun 02, 2003 11:26 am
- Forum: Volume 3 (300-399)
- Topic: 343 - What Base Is This?
- Replies: 72
- Views: 28334
- Wed May 07, 2003 1:02 pm
- Forum: Volume 4 (400-499)
- Topic: 445 - Marvelous Mazes
- Replies: 93
- Views: 21967
About q445
The following is my code, could anyone figure out why I always got WA?
[cpp]
#include <iostream>
#include <cctype>
using namespace std;
void main()
{
char read_in[3000], *ptr;
short repeat, i;
cin.getline(read_in, 3000);
while(cin.good())
{
ptr=read_in;
repeat=0;
while(*ptr!='\0')
{
if ...
[cpp]
#include <iostream>
#include <cctype>
using namespace std;
void main()
{
char read_in[3000], *ptr;
short repeat, i;
cin.getline(read_in, 3000);
while(cin.good())
{
ptr=read_in;
repeat=0;
while(*ptr!='\0')
{
if ...
- Sat May 03, 2003 10:33 am
- Forum: Volume 2 (200-299)
- Topic: 264 - Count on Cantor
- Replies: 47
- Views: 22463
- Sat May 03, 2003 10:28 am
- Forum: Volume 102 (10200-10299)
- Topic: 10298 - Power Strings
- Replies: 31
- Views: 19324
10298-Run Time Error
Invalid memory reference!!
I declared a char array that contains 1 million units.
I wonder if it caused the error!
I declared a char array that contains 1 million units.
I wonder if it caused the error!
- Tue Feb 04, 2003 4:48 am
- Forum: Volume 3 (300-399)
- Topic: 382 - Perfection
- Replies: 95
- Views: 35365
help on q382
I got a WA. Can anyone help me figure out why?
[cpp]#include<iostream>
#include<iomanip>
#include<math.h>
using namespace std;
void main()
{
long input, sum, factor, factor2, sq;
cout << "PERFECTION OUTPUT" << endl;
cin >> input;
while(input)
{
sum=1, factor=2;
sq=(long)sqrt(input);
if((sq ...
[cpp]#include<iostream>
#include<iomanip>
#include<math.h>
using namespace std;
void main()
{
long input, sum, factor, factor2, sq;
cout << "PERFECTION OUTPUT" << endl;
cin >> input;
while(input)
{
sum=1, factor=2;
sq=(long)sqrt(input);
if((sq ...
- Tue Feb 04, 2003 4:04 am
- Forum: Volume 1 (100-199)
- Topic: 107 - The Cat in the Hat
- Replies: 278
- Views: 55057
about "t_base"
I'm sure I've prevented "t_base" from being 1, since before this part I have an "if" to handle the problem directly when there is only ONE working cat. For example, when I input "64 1", I will get "6 127", right answer, isn't it? Or did I ignored any other "except" situations? :roll:
- Mon Feb 03, 2003 4:50 pm
- Forum: Volume 1 (100-199)
- Topic: 107 - The Cat in the Hat
- Replies: 278
- Views: 55057
Floating point exception
I have tried lots of inputs (partly from the Problemset Archive and partly from some discussions about q107) by hand and it always gave me right answers. I can't figure out why I should get "float point exception."
The followings are the considered most "fragile" part in my code. I hope someone can ...
The followings are the considered most "fragile" part in my code. I hope someone can ...
- Fri Jan 31, 2003 11:14 am
- Forum: C
- Topic: Invalid Memory Reference
- Replies: 3
- Views: 2807
The discription of the problems
Sometimes the description of the problems really confuses me. For example, q477 should be a very easy one; after I enlarged my array size (for example, double something[10000]), I got "accepted" response. However, the description didn't mention it would be rejudged. Insted, it clearly mentioned ...
- Thu Jan 30, 2003 4:17 am
- Forum: C
- Topic: Invalid Memory Reference
- Replies: 3
- Views: 2807
Invalid Memory Reference
Some of my programs work well in my computer, but I will get a "Invalid Memory Reference" crash message. What does it mean? How could I fixed the problem? 

- Thu Jan 30, 2003 4:12 am
- Forum: Volume 4 (400-499)
- Topic: 477 - Points in Figures: Rectangles and Circles
- Replies: 11
- Views: 3328
477 - Points in Figures: Rectangles and Circles
My program works well in my computer, but I always get a "Inavlid memory reference" crash message. I can't figure out why. Maybe someone could help me?
---------------------------------------------------------------------------
#include<stdio.h>
#include<stdlib.h>
#define RECTANGLE 1
#define ...
---------------------------------------------------------------------------
#include<stdio.h>
#include<stdlib.h>
#define RECTANGLE 1
#define ...