A. Password Checker
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Time Limit: 1.0 s
Memory Limit: 64.0 MB
Given a password, check if its valid.
A valid password satisfies the following conditions.
- Minimum 8 character.
- Atleast one lower case character.
- Atleast one upper case character.
- Atleast one digit character.
- Atleast one special character [!@#$%^&*()].
Input format:
T, where T = number of case to check. T <= 100
S, where S = the string to check for validity. [S] <= 100
Output format:
s, where s = "valid" if the url is valid, else s = "invalid".
Sample Input:
3
1qazZAQ!
1avbac
3554535
Sample Output:
valid
invalid
invalid
Hint
C Code
#include <stdio.h>
int main(void)
{
int a, b;
scanf("%d%d", &a, &b);
printf("%d\n", a + b);
return 0;
}
C++ Code
#include <iostream>
using namespace std;
int main()
{
int a, b;
cin >> a >> b;
cout << a + b << endl;
return 0;
}
C# Code
using System;
using System.Linq;
class Program {
public static void Main(string[] args) {
Console.WriteLine(Console.ReadLine().Split().Select(int.Parse).Sum());
}
}
Python3 Code
a, b = list(map(int, input().split()))
print(a + b)
Java Code
import java.io.*;
import java.util.Scanner;
public class Main {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
System.out.println(a + b);
}
}
Ruby Code
a, b = gets.split.map(&:to_i)
puts(a + b)
Source
Beta Round #1
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 5
- Start at
- 2023-11-29 16:00
- End at
- 2023-11-29 18:00
- Duration
- 2.0 hour(s)
- Host
- Partic.
- 23