[CodeForces] [630A] Again Twenty Five!

Problem Description

Loading...

Problem Analysis

A pattern-finding problem
It asks for the last two digits of 5 to the power of n

Hmm…

So trivial…

cpp
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#include<stdio.h>
#include<string.h>
int main() {
	char s[100];
	while(scanf("%s",s)!=EOF) {
		if(strcmp(s,"1")==0)
			printf("5\n");
		else
			printf("25\n");
	}
	return 0;
}

Problem link: 【CodeForces】[630A]Again Twenty Five!

This post is licensed under CC BY-NC-SA 4.0. If it helped, or if you have anything to say, the comment box below is open.
Page views —
Unique visitors —

Loading...