<span id="mktg5"></span>

<i id="mktg5"><meter id="mktg5"></meter></i>

        <label id="mktg5"><meter id="mktg5"></meter></label>
        最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
        問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
        當前位置: 首頁 - 科技 - 知識百科 - 正文

        Codeforces#282div2ABC_html/css

        來源:懂視網 責編:小采 時間:2020-11-27 15:59:37
        文檔

        Codeforces#282div2ABC_html/css

        Codeforces#282div2ABC_html/css_WEB-ITnose:A. Digital Counter time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Malek lives in an apartment block with 100 floors numbered from 0 to 99. The apartment has an
        推薦度:
        導讀Codeforces#282div2ABC_html/css_WEB-ITnose:A. Digital Counter time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Malek lives in an apartment block with 100 floors numbered from 0 to 99. The apartment has an

        A. Digital Counter

        time limit per test

        1 second

        memory limit per test

        256 megabytes

        input

        standard input

        output

        standard output

        Malek lives in an apartment block with 100 floors numbered from 0 to 99. The apartment has an elevator with a digital counter showing the floor that the elevator is currently on. The elevator shows each digit of a number with 7 light sticks by turning them on or off. The picture below shows how the elevator shows each digit.

        One day when Malek wanted to go from floor 88 to floor 0 using the elevator he noticed that the counter shows number 89 instead of 88. Then when the elevator started moving the number on the counter changed to 87. After a little thinking Malek came to the conclusion that there is only one explanation for this: One of the sticks of the counter was broken. Later that day Malek was thinking about the broken stick and suddenly he came up with the following problem.

        Suppose the digital counter is showing number n. Malek calls an integer x (0?≤?x?≤?99) good if it's possible that the digital counter was supposed to show x but because of some(possibly none) broken sticks it's showing n instead. Malek wants to know number of good integers for a specific n. So you must write a program that calculates this number. Please note that the counter always shows two digits.

        Input

        The only line of input contains exactly two digits representing number n (0?≤?n?≤?99). Note that n may have a leading zero.

        Output

        In the only line of the output print the number of good integers.

        Sample test(s)

        Input

        89

        Output

        Input

        00

        Output

        Input

        73

        Output

        15

        Note

        In the first sample the counter may be supposed to show 88 or 89.

        In the second sample the good integers are 00, 08, 80 and 88.

        In the third sample the good integers are 03,?08,?09,?33,?38,?39,?73,?78,?79,?83,?88,?89,?93,?98,?99.


        #include #include #include #include #include #include #define N 1000#define ll __int64using namespace std;int vis[20]={2,7,2,3,3,4,2,5,1,2};//電梯數字顯示出現不同程度損壞,可能有一個或幾個stick熄滅,算出每個數字存在的情況
        int main()
        { int n; while(~scanf("%d",&n)) { int ans=1; int a=n%10; int b=n/10; ans*=vis[a]; ans*=vis[b]; cout< 

        B. Modular Equations

        time limit per test

        1 second

        memory limit per test

        256 megabytes

        input

        standard input

        output

        standard output

        Last week, Hamed learned about a new type of equations in his math class called Modular Equations. Lets define i modulo j as the remainder of division of i by j and denote it by . A Modular Equation, as Hamed's teacher described, is an equation of the form in which a and b are two non-negative integers and x is a variable. We call a positive integer x for which a solution of our equation.

        Hamed didn't pay much attention to the class since he was watching a movie. He only managed to understand the definitions of these equations.

        Now he wants to write his math exercises but since he has no idea how to do that, he asked you for help. He has told you all he knows about Modular Equations and asked you to write a program which given two numbers a and b determines how many answers the Modular Equation has.

        Input

        In the only line of the input two space-separated integers a and b (0?≤?a,?b?≤?109) are given.

        Output

        If there is an infinite number of answers to our equation, print "infinity" (without the quotes). Otherwise print the number of solutions of the Modular Equation .

        Sample test(s)

        Input

        21 5

        Output

        Input

        9435152 272

        Output

        282

        Input

        10 10

        Output

        infinity

        Note

        In the first sample the answers of the Modular Equation are 8 and 16 since


        #include #include #include #include #include #include #define N 10000009#define ll __int64using namespace std;//a=b+kx;因為數據比較大10^9,所有不能直接暴力,稍微轉化一下
        int main(){ ll a,b; while(~scanf("%I64d%I64d",&a,&b)) { ll c=a-b; if(a==b) { printf("infinity\n"); continue; } if(ab) { ans++; } if( i*ib) ) ans++; } } cout< 

        C. Treasure

        time limit per test

        2 seconds

        memory limit per test

        256 megabytes

        input

        standard input

        output

        standard output

        Malek has recently found a treasure map. While he was looking for a treasure he found a locked door. There was a string s written on the door consisting of characters '(', ')' and '#'. Below there was a manual on how to open the door. After spending a long time Malek managed to decode the manual and found out that the goal is to replace each '#' with one or more ')' characters so that the final string becomes beautiful.

        Below there was also written that a string is called beautiful if for each i (1?≤?i?≤?|s|) there are no more ')' characters than '(' characters among the first i characters of s and also the total number of '(' characters is equal to the total number of ')' characters.

        Help Malek open the door by telling him for each '#' character how many ')' characters he must replace it with.

        Input

        The first line of the input contains a string s (1?≤?|s|?≤?105). Each character of this string is one of the characters '(', ')' or '#'. It is guaranteed that s contains at least one '#' character.

        Output

        If there is no way of replacing '#' characters which leads to a beautiful string print ?-?1. Otherwise for each character '#' print a separate line containing a positive integer, the number of ')' characters this character must be replaced with.

        If there are several possible answers, you may output any of them.

        Sample test(s)

        Input

        (((#)((#)

        Output

        12

        Input

        ()((#((#(#()

        Output

        221

        Input

        Output

        -1

        Input

        (#)

        Output

        -1

        Note

        |s| denotes the length of the string s.


        #include #include #include #include #include #include #define N 100009using namespace std;char str[N];vector t;int main(){ while(~scanf("%s",str)) { int a=0,b=0,c=0; int num=0; int len=strlen(str); for(int i=0;i

        聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

        文檔

        Codeforces#282div2ABC_html/css

        Codeforces#282div2ABC_html/css_WEB-ITnose:A. Digital Counter time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Malek lives in an apartment block with 100 floors numbered from 0 to 99. The apartment has an
        推薦度:
        標簽: div Codeforces div2
        • 熱門焦點

        最新推薦

        猜你喜歡

        熱門推薦

        專題
        Top
        主站蜘蛛池模板: 中国一级全黄的免费观看| AV激情亚洲男人的天堂国语| 两性色午夜视频免费网| 四虎影库久免费视频| 老司机亚洲精品影院在线观看| 成人免费777777| 亚洲美国产亚洲AV| 日韩电影免费在线观看视频| 亚洲中文字幕无码久久| 日产乱码一卡二卡三免费| 国产精品亚洲а∨无码播放不卡 | 亚洲精品国产成人中文| 久久国产色AV免费看| 亚洲成人在线免费观看| 最近中文字幕免费mv视频7| 亚洲砖码砖专无区2023| 午夜两性色视频免费网站| 最新亚洲人成无码网站| 伊伊人成亚洲综合人网7777| 久久免费视频99| 亚洲中文字幕久在线| 国产一级一片免费播放i| 黄色视频在线免费观看| 亚洲AV无码成人网站久久精品大| 19禁啪啪无遮挡免费网站| 亚洲精品无码少妇30P| 在线亚洲精品自拍| 67194国产精品免费观看| 亚洲精品永久在线观看| 日本亚洲国产一区二区三区| **一级一级毛片免费观看| 亚洲高清乱码午夜电影网| 中文字幕亚洲无线码| 久久精品无码一区二区三区免费| 色噜噜狠狠色综合免费视频| 亚洲av永久无码制服河南实里| 一个人看www在线高清免费看| 国产精品免费久久| 亚洲高清视频在线| 日本亚洲成高清一区二区三区| 国产福利在线观看免费第一福利|