P7001 [NEERC2013] Fraud Busters (Simulation)

[NEERC2013] Fraud Busters Title translation Given a string of length 9 containing unknown characters, unknown characters are represented by ‘*’ (without quotes). Given below are n strings of length 9. If the string entered below is exactly the same as the string entered at the beginning except for the unknown part, then the string meets […]

ERC20-Create your own virtual currency

erc20 needs to implement the following methods function name() public view returns (string) function symbol() public view returns (string) function decimals() public view returns (uint8) function totalSupply() public view returns (uint256) function balanceOf(address _owner) public view returns (uint256 balance) function transfer(address _to, uint256 _value) public returns (bool success) function transferFrom(address _from, address _to, uint256 _value) […]

Smart contract ERC20 deducts the specified handling fee for each transfer to the specified address/excluding the contract owner

// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed […]

P7009 [CERC2013] Magical GCD

Link to topic luogu P7009 Title Title translation have T T T sets of queries, each given no no n number a i a_i ai?. You need to find a subsequence of this array (consecutive numbers are required) that maximizes the product of the greatest common divisor of all numbers in the sequence and the […]

Solidity Ethereum Smart Contract Standard-ERC20 (version 2023)

ERC20 standard interface interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event […]